mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
Merge pull request #27352 from liewegas/wip-deferred-log-start
common: start logging for non-global_init users Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
fcca032bed
@ -106,6 +106,10 @@ void common_init_finish(CephContext *cct)
|
||||
cct->init_crypto();
|
||||
ZTracer::ztrace_init();
|
||||
|
||||
if (!cct->_log->is_started()) {
|
||||
cct->_log->start();
|
||||
}
|
||||
|
||||
int flags = cct->get_init_flags();
|
||||
if (!(flags & CINIT_FLAG_NO_DAEMON_ACTIONS))
|
||||
cct->start_service_thread();
|
||||
|
@ -77,8 +77,6 @@ public:
|
||||
|
||||
int init()
|
||||
{
|
||||
common_init_finish(cct);
|
||||
|
||||
int ret;
|
||||
|
||||
{
|
||||
@ -88,6 +86,8 @@ public:
|
||||
return ret;
|
||||
}
|
||||
|
||||
common_init_finish(cct);
|
||||
|
||||
//monmap
|
||||
monclient = new MonClient(cct);
|
||||
ret = -CEPHFS_ERROR_MON_MAP_BUILD; //defined in libcephfs.h;
|
||||
|
@ -82,6 +82,8 @@ class Log : private Thread
|
||||
void _log_message(const char *s, bool crash);
|
||||
|
||||
public:
|
||||
using Thread::is_started;
|
||||
|
||||
Log(const SubsystemMap *s);
|
||||
~Log() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user