Switch to lg2 for logging
After enabling C++20, lg2 is preferred for logging. This patch replaces
all phosphor::logging::log calls to lg2 calls.
Tested:
Build pass.
Change-Id: Ic37bc36f43c2b3a1c61b1328af95e3a41c8d6d40
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
diff --git a/shadowlock.hpp b/shadowlock.hpp
index f274966..854874d 100644
--- a/shadowlock.hpp
+++ b/shadowlock.hpp
@@ -5,7 +5,7 @@
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
#include <cassert>
@@ -36,7 +36,7 @@
{
if (!lckpwdf())
{
- log<level::ERR>("Locking Shadow failed");
+ lg2::error("Failed to lock shadow file");
elog<InternalFailure>();
}
}
@@ -44,7 +44,7 @@
{
if (!ulckpwdf())
{
- log<level::ERR>("Un-Locking Shadow failed");
+ lg2::error("Failed to unlock shadow file");
elog<InternalFailure>();
}
}