diff options
| author | Stefan Boberg <[email protected]> | 2023-12-05 08:51:53 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-05 08:51:53 +0100 |
| commit | 0b9d89f5beb889c1785a8f22b586c59bcca0b3ea (patch) | |
| tree | b0359fb51b002b28d9b480813d308cc93c1e220f /src/zencore/logging.cpp | |
| parent | 0.2.36-pre3 (diff) | |
| download | zen-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.cpp | 12 |
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* |