From: Kefu Chai Date: Wed, 14 Jul 2021 13:24:46 +0000 (+0800) Subject: crimson/common/log: print out logger.debug() when log level >=6 X-Git-Tag: v17.1.0~1395^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42334%2Fhead;p=ceph.git 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 --- diff --git a/doc/dev/crimson/crimson.rst b/doc/dev/crimson/crimson.rst index 8e95e0c9b1a..3508b5990b4 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 63534909822..1362869bb58 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;