logging: switch networkd static_library to lg2
This commit switches logging to lg2 in the following files -
1. src/dhcp_configuration.cpp
2. src/dhcp_configuration.cpp
3. src/ipaddress.cpp
4. src/system_configuration.cpp
5. src/system_queries.cpp
Tested: Build passes with "ninja -C build".
Change-Id: I492c7579c968810b783836b652e450ff89b8cd4b
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/src/system_queries.cpp b/src/system_queries.cpp
index 9a8cba8..6c59547 100644
--- a/src/system_queries.cpp
+++ b/src/system_queries.cpp
@@ -10,7 +10,7 @@
#include <algorithm>
#include <optional>
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <stdexcept>
#include <stdplus/fd/create.hpp>
#include <stdplus/util/cexec.hpp>
@@ -20,9 +20,6 @@
{
using std::literals::string_view_literals::operator""sv;
-using phosphor::logging::entry;
-using phosphor::logging::level;
-using phosphor::logging::log;
static stdplus::Fd& getIFSock()
{
@@ -69,10 +66,8 @@
if (unsupported.find(ukey) == unsupported.end())
{
unsupported.emplace(std::move(ukey));
- auto msg =
- fmt::format("{} not supported on {}", cmdname, ifname);
- log<level::INFO>(msg.c_str(),
- entry("INTERFACE=%s", ifname.c_str()));
+ lg2::info("{CMD_NAME} not supported on {INTERFACE_NAME}",
+ "CMD_NAME", cmdname, "INTERFACE_NAME", ifname);
}
return ret;
}