From: Kefu Chai Date: Sat, 29 Jun 2019 13:35:31 +0000 (+0800) Subject: common/config_values: set seastar logging level as well X-Git-Tag: v15.1.0~2342^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=253d05306c55977e2abcb9dcf0b8c6bd2ceb7c54;p=ceph-ci.git 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 --- 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 } }