Move the monitor application to lg2
Update the logging API used for files in phosphor-fan-presence/monitor
from the older phosphor::logging::log to the more recent lg2::log.
Tested:
* Verified journal traces worked correctly in simulation.
* Modified json and simulation parameters to force various
application errors and verified correct output and key/value
pairs using journalctl.
Change-Id: Id6f5161edfd09b672aba8751a6d2c6518665188a
Signed-off-by: Anwaar Hadi <anwaar.hadi@ibm.com>
diff --git a/monitor/fan.cpp b/monitor/fan.cpp
index a9ca013..ab8d46d 100644
--- a/monitor/fan.cpp
+++ b/monitor/fan.cpp
@@ -21,7 +21,7 @@
#include "types.hpp"
#include "utility.hpp"
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <format>
@@ -439,7 +439,7 @@
if (response.is_method_error())
{
- log<level::ERR>("Error in Notify call to update inventory");
+ lg2::error("Error in Notify call to update inventory");
dbusError = true;
}