aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/logging.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-12-05 08:51:53 +0100
committerGitHub <[email protected]>2023-12-05 08:51:53 +0100
commit0b9d89f5beb889c1785a8f22b586c59bcca0b3ea (patch)
treeb0359fb51b002b28d9b480813d308cc93c1e220f /src/zencore/logging.cpp
parent0.2.36-pre3 (diff)
downloadzen-0b9d89f5beb889c1785a8f22b586c59bcca0b3ea.tar.xz
zen-0b9d89f5beb889c1785a8f22b586c59bcca0b3ea.zip
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
Diffstat (limited to 'src/zencore/logging.cpp')
-rw-r--r--src/zencore/logging.cpp12
1 files changed, 12 insertions, 0 deletions
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<spdlog::level::level_enum>(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*