Skip to content

Commit ab00bd8

Browse files
committed
Map debug level to info
As the comment states, openbmc currently squashes DEBUG level messages. After ee993dc 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 <[email protected]>
1 parent b3b3ee9 commit ab00bd8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

http/logging.hpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ constexpr int toSystemdLevel(LogLevel level)
5555
{LogLevel::Warning, 4},
5656
// NOTICE 5
5757
{LogLevel::Info, 6},
58-
{LogLevel::Debug, 7}}};
58+
// Note, debug here is actually mapped to info level, because OpenBMC
59+
// has a MaxLevelSyslog and MaxLevelStore of info, so DEBUG level will
60+
// never be stored.
61+
{LogLevel::Debug, 6}}};
5962

6063
const auto* it = std::ranges::find_if(
6164
mapping, [level](const std::pair<LogLevel, int>& elem) {
@@ -65,7 +68,7 @@ constexpr int toSystemdLevel(LogLevel level)
6568
// Unknown log level. Just assume debug
6669
if (it != mapping.end())
6770
{
68-
return 7;
71+
return 6;
6972
}
7073

7174
return it->second;

0 commit comments

Comments
 (0)