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/user_mgr.hpp b/user_mgr.hpp
index ec205e4..6dcc898 100644
--- a/user_mgr.hpp
+++ b/user_mgr.hpp
@@ -20,7 +20,7 @@
 #include <boost/process/io.hpp>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/elog.hpp>
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
@@ -97,10 +97,8 @@
     int retCode = execProg.exit_code();
     if (retCode)
     {
-        phosphor::logging::log<phosphor::logging::level::ERR>(
-            "Command execution failed",
-            phosphor::logging::entry("PATH=%s", path),
-            phosphor::logging::entry("RETURN_CODE=%d", retCode));
+        lg2::error("Command {PATH} execution failed, return code {RETCODE}",
+                   "PATH", path, "RETCODE", retCode);
         phosphor::logging::elog<
             sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure>();
     }