summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-09-27 12:05:12 -0700
committerWilliam A. Kennington III <wak@google.com>2018-09-27 13:46:41 -0700
commit09095f8eed78fdfac87e690f3ae125d50ed03500 (patch)
tree41f1bef069e2fa3e8c9805f328dcf90511419fda
parent3a70fa24fc016a06b0dc2ecdc3c7275d1f25425c (diff)
downloadphosphor-networkd-09095f8eed78fdfac87e690f3ae125d50ed03500.tar.gz
phosphor-networkd-09095f8eed78fdfac87e690f3ae125d50ed03500.zip
network_manager_main: Use logging classes up front
This makes them accessible throughout the file and disambiguates what can propagate from the phosphor::logging namespace. Tested: Compiles as expected. Change-Id: I36a6407e4313c8c2436e7cd3efd8c99ca385882e Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r--network_manager_main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/network_manager_main.cpp b/network_manager_main.cpp
index 7709f7d..616d37e 100644
--- a/network_manager_main.cpp
+++ b/network_manager_main.cpp
@@ -17,6 +17,12 @@
#include <sdeventplus/event.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
+using phosphor::logging::elog;
+using phosphor::logging::entry;
+using phosphor::logging::level;
+using phosphor::logging::log;
+using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
+
namespace phosphor
{
namespace network
@@ -29,7 +35,6 @@ std::unique_ptr<Timer> restartTimer = nullptr;
/** @brief refresh the network objects. */
void refreshObjects()
{
- using namespace phosphor::logging;
if (manager)
{
log<level::INFO>("Refreshing the objects.");
@@ -57,9 +62,6 @@ void initializeTimers()
void createNetLinkSocket(phosphor::Descriptor& smartSock)
{
- using namespace phosphor::logging;
- using InternalFailure =
- sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
// RtnetLink socket
auto fd = socket(PF_NETLINK, SOCK_RAW | SOCK_NONBLOCK, NETLINK_ROUTE);
if (fd < 0)
@@ -74,8 +76,6 @@ void createNetLinkSocket(phosphor::Descriptor& smartSock)
int main(int argc, char* argv[])
{
- using namespace phosphor::logging;
-
phosphor::network::initializeTimers();
auto bus = sdbusplus::bus::new_default();
OpenPOWER on IntegriCloud