logging: switch phosphor-network-manager exe to lg2
Tested: Build passes with "ninja -C build".
Change-Id: Ib02682393aba65b16f55eece58ecf50321190a56
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/src/rtnetlink_server.cpp b/src/rtnetlink_server.cpp
index a4266b7..3fe997e 100644
--- a/src/rtnetlink_server.cpp
+++ b/src/rtnetlink_server.cpp
@@ -7,17 +7,13 @@
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <stdplus/fd/create.hpp>
#include <stdplus/fd/ops.hpp>
namespace phosphor::network::netlink
{
-using phosphor::logging::entry;
-using phosphor::logging::level;
-using phosphor::logging::log;
-
inline void rthandler(std::string_view data, auto&& cb)
{
auto ret = gatewayFromRtm(data);
@@ -66,8 +62,7 @@
}
catch (const std::exception& e)
{
- auto msg = fmt::format("Failed handling netlink event: {}", e.what());
- log<level::ERR>(msg.c_str(), entry("ERROR=%s", e.what()));
+ lg2::error("Failed handling netlink event: {ERROR}", "ERROR", e);
}
}