Cleanup old headers and namespace declarations
Remove the header includes for the old phosphor::logging::log API
as well as unnecessary phosphor::logging namespace declarations.
Fully qualify phosphor::logging namespace where applicable and/or
needed.
Tested:
* Verified commit passed CI unit tests.
* Verified commit built using bitbake.
Change-Id: I2e490e1aa3fd3423f8c52694c2b97bc58b95525a
Signed-off-by: Anwaar Hadi <anwaar.hadi@ibm.com>
diff --git a/presence/anyof.cpp b/presence/anyof.cpp
index 635e6a6..07a31eb 100644
--- a/presence/anyof.cpp
+++ b/presence/anyof.cpp
@@ -19,8 +19,6 @@
#include "get_power_state.hpp"
#include "psensor.hpp"
-#include <phosphor-logging/log.hpp>
-
#include <algorithm>
namespace phosphor
diff --git a/presence/error_reporter.cpp b/presence/error_reporter.cpp
index 927ca2f..b57fa81 100644
--- a/presence/error_reporter.cpp
+++ b/presence/error_reporter.cpp
@@ -22,7 +22,6 @@
#include <unistd.h>
-#include <phosphor-logging/log.hpp>
#include <xyz/openbmc_project/Logging/Create/server.hpp>
#include <xyz/openbmc_project/Logging/Entry/server.hpp>
@@ -32,7 +31,6 @@
{
using json = nlohmann::json;
-using namespace phosphor::logging;
using namespace sdbusplus::bus::match;
using namespace std::literals::string_literals;
using namespace std::chrono;
diff --git a/presence/gpio.cpp b/presence/gpio.cpp
index 0bd5b6f..0920b35 100644
--- a/presence/gpio.cpp
+++ b/presence/gpio.cpp
@@ -66,10 +66,10 @@
void Gpio::fail()
{
using namespace sdbusplus::xyz::openbmc_project::Common::Callout::Error;
- using namespace phosphor::logging;
- using namespace xyz::openbmc_project::Common::Callout;
+ using namespace phosphor::logging::xyz::openbmc_project::Common::Callout;
- report<sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO>(
+ phosphor::logging::report<
+ sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO>(
GPIO::CALLOUT_GPIO_NUM(pin), GPIO::CALLOUT_ERRNO(0),
GPIO::CALLOUT_DEVICE_PATH(phys.c_str()));
}
diff --git a/presence/json_parser.cpp b/presence/json_parser.cpp
index 37c0d3a..00c3b6b 100644
--- a/presence/json_parser.cpp
+++ b/presence/json_parser.cpp
@@ -41,7 +41,6 @@
using json = nlohmann::json;
namespace fs = std::filesystem;
-using namespace phosphor::logging;
policies JsonConfig::_policies;
const std::map<std::string, methodHandler> JsonConfig::_methods = {
diff --git a/presence/tach.cpp b/presence/tach.cpp
index d27c356..b03a927 100644
--- a/presence/tach.cpp
+++ b/presence/tach.cpp
@@ -32,7 +32,6 @@
namespace presence
{
-using namespace phosphor::logging;
using namespace std::literals::string_literals;
static const auto tachNamespace = "/xyz/openbmc_project/sensors/fan_tach/"s;