remove phosphor-logging dependency
This commit removes pldm's dependency on phosphor-logging
and instead uses stdout and stdcerr for logging purpose.This is to
break the build time circular dependency between pldm and
phosphor-logging.
Change-Id: I8cffa3c99eb34efad5f186b3452a86ebadec2074
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
diff --git a/oem/ibm/libpldmresponder/file_io_type_pel.cpp b/oem/ibm/libpldmresponder/file_io_type_pel.cpp
index a5fa49a..c919c27 100644
--- a/oem/ibm/libpldmresponder/file_io_type_pel.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_pel.cpp
@@ -11,6 +11,7 @@
#include <exception>
#include <filesystem>
+#include <iostream>
#include <sdbusplus/server.hpp>
#include <vector>
#include <xyz/openbmc_project/Logging/Entry/server.hpp>
@@ -23,8 +24,6 @@
namespace responder
{
-using namespace phosphor::logging;
-
int PelHandler::readIntoMemory(uint32_t /*offset*/, uint32_t& /*length*/,
uint64_t /*address*/)
{
@@ -44,8 +43,8 @@
int fd = mkstemp(tmpFile);
if (fd == -1)
{
- log<level::ERR>("failed to create a temporary pel",
- entry("ERROR=%d", errno));
+ std::cerr << "failed to create a temporary pel, ERROR=" << errno
+ << "\n";
return PLDM_ERROR;
}
close(fd);
@@ -86,8 +85,8 @@
}
catch (const std::exception& e)
{
- log<level::ERR>("failed to make a d-bus call to PEL daemon",
- entry("ERROR=%s", e.what()));
+ std::cerr << "failed to make a d-bus call to PEL daemon, ERROR="
+ << e.what() << "\n";
return PLDM_ERROR;
}