From 0b9d89f5beb889c1785a8f22b586c59bcca0b3ea Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Tue, 5 Dec 2023 08:51:53 +0100 Subject: HTTP plugin request debug logging (#587) * added log level control/query to LoggerRef * added debug logging to http plugin implementation * added GetDebugName() to transport plugin interfaces * added debug name to log output --- src/zencore/logging.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/zencore/logging.cpp') diff --git a/src/zencore/logging.cpp b/src/zencore/logging.cpp index 434c461ae..025ed4262 100644 --- a/src/zencore/logging.cpp +++ b/src/zencore/logging.cpp @@ -320,6 +320,18 @@ LoggerRef::ShouldLog(int Level) const return SpdLogger->should_log(static_cast(Level)); } +void +LoggerRef::SetLogLevel(logging::level::LogLevel NewLogLevel) +{ + SpdLogger->set_level(to_spdlog_level(NewLogLevel)); +} + +logging::level::LogLevel +LoggerRef::GetLogLevel() +{ + return logging::level::to_logging_level(SpdLogger->level()); +} + thread_local ScopedActivityBase* t_ScopeStack = nullptr; ScopedActivityBase* -- cgit v1.2.3