]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/LogEntry: Add log level to str helper for fmt::formatter<LogEntry> 55455/head
authorSridhar Seshasayee <sseshasa@redhat.com>
Tue, 19 Dec 2023 15:05:50 +0000 (20:35 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Mon, 5 Feb 2024 17:00:18 +0000 (22:30 +0530)
commit0bd01b9c1a78c13d404c667e49ed3b9cb931fb47
treed1a269f450b0ae4b480234af2ded40d33fc72b87
parent62be5c7cae0d0c495c0ac423e19dd09557edadd8
common/LogEntry: Add log level to str helper for fmt::formatter<LogEntry>

The Ceph cluster logs were missing the string equivalent [INF|WRN|ERR|DBG]
representation of the 'prio' field. This was broken since the introduction
of commit 2901943618f071060f72d69cf632a4097e439df4 of
PR: https://github.com/ceph/ceph/pull/47830. This probably caused false
positives in teuthology testing and particularly for those tests that check
for cluster badness by parsing the cluster logs.

The fix involves adding a static helper function to the LogEntry struct.
This function returns the string appropriate representation of the log
level similar to the operator<<() for LogEntry.

Fixes: https://tracker.ceph.com/issues/64314
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
src/common/LogEntry.h