summaryrefslogtreecommitdiffstats
path: root/src/global
diff options
context:
space:
mode:
authorSage Weil <sage.weil@dreamhost.com>2012-04-22 23:35:39 +0200
committerSage Weil <sage.weil@dreamhost.com>2012-04-29 01:27:22 +0200
commitc4c59a094d2e355d5bbe90c6dc7e92473a35380d (patch)
treee8f8eb0f483acc51deb41026e7c0ef33a06aaa78 /src/global
parentStop rebuild of libcommon.la on "make dist" (diff)
downloadceph-c4c59a094d2e355d5bbe90c6dc7e92473a35380d.tar.xz
ceph-c4c59a094d2e355d5bbe90c6dc7e92473a35380d.zip
log: do not set on_exit() callback for libraries
Set this up in either global_init() or common_init_finish(), both opportune times that occur after config parsing has happened and the user has the option to modify this behavior. The exception would be libraries like librados, which can't use rados_conf_* to enable this. Arguably flush functionality should be exposed through the librados API directly, instead of futzing with on_exit(). Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Diffstat (limited to 'src/global')
-rw-r--r--src/global/global_init.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/global/global_init.cc b/src/global/global_init.cc
index 44db4c14810..90c1edc0451 100644
--- a/src/global/global_init.cc
+++ b/src/global/global_init.cc
@@ -107,6 +107,9 @@ void global_init(std::vector < const char * > *alt_def_args, std::vector < const
block_signals(siglist, NULL);
install_standard_sighandlers();
+ if (g_conf->log_flush_on_exit)
+ g_ceph_context->_log->set_flush_on_exit();
+
if (g_lockdep) {
dout(1) << "lockdep is enabled" << dendl;
lockdep_register_ceph_context(cct);