]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-conf: do not log
authorSage Weil <sage@inktank.com>
Thu, 27 Mar 2014 18:36:42 +0000 (11:36 -0700)
committerSage Weil <sage@inktank.com>
Thu, 27 Mar 2014 18:36:42 +0000 (11:36 -0700)
If you are querying the conf for an osd and it has a log configured, we
should not generate any log activity.

This isn't super pretty, but it is much less intrusive that wiring a 'do
not log' flag down into CephContext and a zillion other places.

Fixes: #7849
Signed-off-by: Sage Weil <sage@inktank.com>
src/tools/ceph_conf.cc

index 14045f9f857445e7571cd84f4724474acd292b99..99de8b8cfcf118ad7966d5932b2caa9ec5bbaece 100644 (file)
@@ -158,6 +158,11 @@ int main(int argc, const char **argv)
   env_to_vec(args);
   vector<const char*> orig_args = args;
 
+  args.push_back("--log-file");
+  args.push_back("");
+  args.push_back("--no-log-to-stderr");
+  args.push_back("--no-log-to-syslog");
+
   global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON,
              CINIT_FLAG_NO_DAEMON_ACTIONS);