diff options
author | Myung Bae <myungbae@us.ibm.com> | 2023-08-01 23:12:35 +0300 |
---|---|---|
committer | Myung Bae <myungbae@us.ibm.com> | 2023-08-02 03:46:07 +0300 |
commit | d518a9beb3c5fb36ea7a6da0d920ff3a4eddabac (patch) | |
tree | 006f385e75d1ff0932d86ae9214280527e65101e /http/logging.hpp | |
parent | 59ba63885eadecea4bd722141cd41bffecf96397 (diff) | |
download | bmcweb-d518a9beb3c5fb36ea7a6da0d920ff3a4eddabac.tar.xz |
Fix logging level handling
The log entries with the meson configured log level are
currently missing.
Tested:
- Add the logging level to debug to local.conf
```
conf/local.conf:
EXTRA_OEMESON:pn-bmcweb:append = "-Dbmcweb-logging='debug'"
```
- Run the current bmcweb and check bmcweb DEBUG logs which won't be shown.
- With the fix, do the same test and check the DEBUG logs.
```
Aug 02 00:07:52 p10bmc bmcweb[229]: [INFO http_connection.hpp:229] Request: 0x1759d10 HTTP/1.1 GET /redfish ::ffff:127.0.0.1
Aug 02 00:07:52 p10bmc bmcweb[229]: [DEBUG http_connection.hpp:260] Setting completion handler
Aug 02 00:07:52 p10bmc bmcweb[229]: [DEBUG http_response.hpp:238] 0x16d2540 setting completion handler
Aug 02 00:07:52 p10bmc bmcweb[229]: [DEBUG routing.hpp:669] Matched rule '/redfish/' 1 / 2
Aug 02 00:07:52 p10bmc bmcweb[229]: [DEBUG query.hpp:121] setup redfish route
```
Similar tests can be done with the other logging level.
Change-Id: Ifd6dac5b734363fbad70bc62f3dd03a5053ed2fd
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
Diffstat (limited to 'http/logging.hpp')
-rw-r--r-- | http/logging.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/http/logging.hpp b/http/logging.hpp index 1679777b7b..2928f968e0 100644 --- a/http/logging.hpp +++ b/http/logging.hpp @@ -171,7 +171,7 @@ const void* logPtr(T p) template <LogLevel level> inline void vlog(const FormatString& format, std::format_args&& args) { - if constexpr (bmcwebCurrentLoggingLevel <= level) + if constexpr (bmcwebCurrentLoggingLevel < level) { return; } |