From 83bf44a3c21b14ca50a779c7e3293f8633ee1e3f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 14 Jul 2021 21:24:46 +0800 Subject: [PATCH] crimson/common/log: print out logger.debug() when log level >=6 less chatty when debug level is 5. this matches the behavior of classic osd. Signed-off-by: Kefu Chai --- doc/dev/crimson/crimson.rst | 4 ++-- src/crimson/common/log.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/dev/crimson/crimson.rst b/doc/dev/crimson/crimson.rst index 8e95e0c9b1a9..3508b5990b44 100644 --- a/doc/dev/crimson/crimson.rst +++ b/doc/dev/crimson/crimson.rst @@ -82,9 +82,9 @@ over ``20`` will be printed using ``logger::trace()``. +---------+---------+ | 0 | warn | +---------+---------+ -| [1, 5) | info | +| [1, 6) | info | +---------+---------+ -| [5, 20] | debug | +| [6, 20] | debug | +---------+---------+ | > 20 | trace | +---------+---------+ diff --git a/src/crimson/common/log.h b/src/crimson/common/log.h index 63534909822c..1362869bb589 100644 --- a/src/crimson/common/log.h +++ b/src/crimson/common/log.h @@ -13,7 +13,7 @@ static inline seastar::log_level to_log_level(int level) { return seastar::log_level::error; } else if (level < 1) { return seastar::log_level::warn; - } else if (level < 5) { + } else if (level <= 5) { return seastar::log_level::info; } else if (level <= 20) { return seastar::log_level::debug; -- 2.47.3