]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common/config_values: set seastar logging level as well
authorKefu Chai <kchai@redhat.com>
Sat, 29 Jun 2019 13:35:31 +0000 (21:35 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 29 Jun 2019 13:38:22 +0000 (21:38 +0800)
when the logging level of a subsys changes, update seastar accordingly

before this change, seastar logging levels of different logger are not
connected to ceph's logging levels of different subsystem.

after this change, they are connected. whenever a subsys's logging level
changes, the corresponding seastar logger is updated as well.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/config_values.cc

index bc7fc8028a971490ee7738ad8dfbae4b8622d31e..7acf19ec866f92f7d9fc2ab309047245d0731acb 100644 (file)
@@ -2,6 +2,9 @@
 #include "config_values.h"
 
 #include "config.h"
+#if WITH_SEASTAR
+#include "crimson/common/log.h"
+#endif
 
 ConfigValues::set_value_result_t
 ConfigValues::set_value(const std::string_view key,
@@ -75,6 +78,9 @@ void ConfigValues::set_logging(int which, const char* val)
     }
     subsys.set_log_level(which, log);
     subsys.set_gather_level(which, gather);
+#if WITH_SEASTAR
+    ceph::get_logger(which).set_level(ceph::to_log_level(log));
+#endif
   }
 }