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>
diff --git a/http/logging.hpp b/http/logging.hpp
index 1679777..2928f96 100644
--- a/http/logging.hpp
+++ b/http/logging.hpp
@@ -171,7 +171,7 @@
template <LogLevel level>
inline void vlog(const FormatString& format, std::format_args&& args)
{
- if constexpr (bmcwebCurrentLoggingLevel <= level)
+ if constexpr (bmcwebCurrentLoggingLevel < level)
{
return;
}