Map debug level to info
As the comment states, openbmc currently squashes DEBUG level messages.
After ee993dc84b1e9917b545fdd7367f1127a358084a systemd can see the log
levels, which has the unintended consequence of squashing DEBUG level
messages when enabled.
This is a temporary workaround to fix the regression. Ulimately
implementing something like DEBUG_INVOCATION might be the way to go.
Tested: Enabled debug logging
journalctl -u bmcweb showed debug level messages.
Change-Id: I3c57a47282dbcbf34c58a12d2b7da54f1082fac1
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/http/logging.hpp b/http/logging.hpp
index d0a241c..ed82eb0 100644
--- a/http/logging.hpp
+++ b/http/logging.hpp
@@ -55,7 +55,10 @@
{LogLevel::Warning, 4},
// NOTICE 5
{LogLevel::Info, 6},
- {LogLevel::Debug, 7}}};
+ // Note, debug here is actually mapped to info level, because OpenBMC
+ // has a MaxLevelSyslog and MaxLevelStore of info, so DEBUG level will
+ // never be stored.
+ {LogLevel::Debug, 6}}};
const auto* it = std::ranges::find_if(
mapping, [level](const std::pair<LogLevel, int>& elem) {
@@ -65,7 +68,7 @@
// Unknown log level. Just assume debug
if (it != mapping.end())
{
- return 7;
+ return 6;
}
return it->second;