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/dns_updater.cpp b/src/dns_updater.cpp
index 22693f8..5d9e417 100644
--- a/src/dns_updater.cpp
+++ b/src/dns_updater.cpp
@@ -2,7 +2,7 @@
 
 #include <fstream>
 #include <phosphor-logging/elog-errors.hpp>
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
 #include <sdbusplus/bus.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
@@ -23,16 +23,14 @@
     std::fstream outStream(outFile, std::fstream::out);
     if (!outStream.is_open())
     {
-        log<level::ERR>("Unable to open output file",
-                        entry("FILE=%s", outFile.c_str()));
+        lg2::error("Unable to open output file {FILE}", "FILE", outFile);
         elog<InternalFailure>();
     }
 
     std::fstream inStream(inFile, std::fstream::in);
     if (!inStream.is_open())
     {
-        log<level::ERR>("Unable to open the input file",
-                        entry("FILE=%s", inFile.c_str()));
+        lg2::error("Unable to open the input file {FILE}", "FILE", inFile);
         elog<InternalFailure>();
     }