softoff: switch to lg2
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I9b4071a8647182278b25b044355c707a908b4338
diff --git a/softoff/mainapp.cpp b/softoff/mainapp.cpp
index 6f1f2d3..0791615 100644
--- a/softoff/mainapp.cpp
+++ b/softoff/mainapp.cpp
@@ -19,6 +19,7 @@
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <sdeventplus/event.hpp>
#include <sdeventplus/exception.hpp>
#include <xyz/openbmc_project/State/Host/error.hpp>
@@ -59,8 +60,7 @@
}
catch (const sdeventplus::SdEventError& e)
{
- log<level::ERR>("Failure in processing request",
- entry("ERROR=%s", e.what()));
+ lg2::error("Failure in processing request: {ERROR}", "ERROR", e);
return 1;
}
}