]> 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> 56478/head
authorSridhar Seshasayee <sseshasa@redhat.com>
Tue, 19 Dec 2023 15:05:50 +0000 (20:35 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Tue, 26 Mar 2024 12:57:13 +0000 (18:27 +0530)
commit69c2a898312be0ff44e0d3635a6bc9eaa1dd52de
tree1023595f2e04b93e62709d38abc88e68be137a7a
parentc86339f4c7ca4fc7a4ea266d444fa51b0f13b75e
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>
(cherry picked from commit 0bd01b9c1a78c13d404c667e49ed3b9cb931fb47)
src/common/LogEntry.h