logging: switch to lg2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id62fbc10ab83a0cf94d235e1d1ea3e031295fbf5
diff --git a/ubi/item_updater_helper.cpp b/ubi/item_updater_helper.cpp
index 873bf17..5cb10e0 100644
--- a/ubi/item_updater_helper.cpp
+++ b/ubi/item_updater_helper.cpp
@@ -4,7 +4,7 @@
#include "utils.hpp"
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <sdbusplus/exception.hpp>
namespace phosphor
@@ -14,7 +14,7 @@
namespace updater
{
-using namespace phosphor::logging;
+PHOSPHOR_LOG2_USING;
using sdbusplus::exception::SdBusError;
void Helper::setEntry(const std::string& entryId, uint8_t value)
@@ -77,8 +77,7 @@
}
catch (const SdBusError& e)
{
- log<level::ERR>("Failed to update u-boot env variables",
- entry("VERSIONID=%s", versionId.c_str()));
+ error("Failed to update u-boot env variables", "VERSIONID", versionid);
}
}
@@ -95,7 +94,7 @@
}
catch (const SdBusError& e)
{
- log<level::ERR>("Failed to copy U-Boot to alternate chip");
+ error("Failed to copy U-Boot to alternate chip: {ERROR}", "ERROR", e);
}
}