From 253d05306c55977e2abcb9dcf0b8c6bd2ceb7c54 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 29 Jun 2019 21:35:31 +0800 Subject: [PATCH] common/config_values: set seastar logging level as well 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 --- src/common/config_values.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/config_values.cc b/src/common/config_values.cc index bc7fc8028a9..7acf19ec866 100644 --- a/src/common/config_values.cc +++ b/src/common/config_values.cc @@ -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 } } -- 2.39.5