convert settings.cpp to use lg2

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I279b996390d6ea62a7dd1f96bb1c9eb5c2a7bfc2
diff --git a/settings.cpp b/settings.cpp
index 93eb094..3acb888 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -2,7 +2,7 @@
 
 #include <ipmid/utils.hpp>
 #include <phosphor-logging/elog-errors.hpp>
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
 #include <sdbusplus/message/types.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
@@ -26,8 +26,7 @@
     }
     catch (const std::exception& e)
     {
-        log<level::ERR>("Failed to call the getSubTree method.",
-                        entry("ERROR=%s", e.what()));
+        lg2::error("Failed to call the getSubTree method: {ERROR}", "ERROR", e);
         elog<InternalFailure>();
     }
 
@@ -67,8 +66,7 @@
     }
     catch (const std::exception& e)
     {
-        log<level::ERR>("Invalid response from mapper",
-                        entry("ERROR=%s", e.what()));
+        lg2::error("Invalid response from mapper: {ERROR}", "ERROR", e);
         elog<InternalFailure>();
     }
 }