diff options
author | Nagaraju Goruganti <ngorugan@in.ibm.com> | 2018-03-22 01:27:37 -0500 |
---|---|---|
committer | Emily Shaffer <emilyshaffer@google.com> | 2018-04-02 22:41:59 +0000 |
commit | 1d9d41668fcdaeb99708be784ce04402578182b4 (patch) | |
tree | b6ff095677fd58dab5cea882a61c843296e7041b | |
parent | 166c71a13c5cb48a29bdc0b6e8f4fc30c4375e5e (diff) | |
download | phosphor-net-ipmid-1d9d41668fcdaeb99708be784ce04402578182b4.tar.gz phosphor-net-ipmid-1d9d41668fcdaeb99708be784ce04402578182b4.zip |
Patch #2 Reducing IPMI logging footprint
net-ipmid is noisy in terms of journal logging. A small step towards
cleaning that up.
Partially Resolves openbmc/openbmc#2507
Change-Id: I78e0286fb37086373c86dca276c0948f4595cb0a
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
-rw-r--r-- | command/channel_auth.cpp | 4 | ||||
-rw-r--r-- | command/open_session.cpp | 3 | ||||
-rw-r--r-- | command/rakp12.cpp | 4 | ||||
-rw-r--r-- | command/rakp34.cpp | 3 | ||||
-rw-r--r-- | command/session_cmds.cpp | 7 | ||||
-rw-r--r-- | command_table.cpp | 12 | ||||
-rw-r--r-- | provider_registration.cpp | 1 |
7 files changed, 7 insertions, 27 deletions
diff --git a/command/channel_auth.cpp b/command/channel_auth.cpp index 6b757a6..fbb7242 100644 --- a/command/channel_auth.cpp +++ b/command/channel_auth.cpp @@ -10,8 +10,6 @@ namespace command std::vector<uint8_t> GetChannelCapabilities( const std::vector<uint8_t>& inPayload, const message::Handler& handler) { - std::cout << ">> GetChannelCapabilities\n"; - std::vector<uint8_t> outPayload(sizeof(GetChannelCapabilitiesResp)); auto response = reinterpret_cast<GetChannelCapabilitiesResp*> (outPayload.data()); @@ -46,8 +44,6 @@ std::vector<uint8_t> GetChannelCapabilities( response->oemID[1] = 0; response->oemID[2] = 0; response->oemAuxillary = 0; - - std::cout << "<< GetChannelCapabilities\n"; return outPayload; } diff --git a/command/open_session.cpp b/command/open_session.cpp index f33de3c..6e08d1a 100644 --- a/command/open_session.cpp +++ b/command/open_session.cpp @@ -12,7 +12,6 @@ namespace command std::vector<uint8_t> openSession(const std::vector<uint8_t>& inPayload, const message::Handler& handler) { - std::cout << ">> openSession\n"; std::vector<uint8_t> outPayload(sizeof(OpenSessionResponse)); auto request = reinterpret_cast<const OpenSessionRequest*>(inPayload.data()); @@ -89,8 +88,6 @@ std::vector<uint8_t> openSession(const std::vector<uint8_t>& inPayload, // Session state is Setup in progress session->state = session::State::SETUP_IN_PROGRESS; - - std::cout << "<< openSession\n"; return outPayload; } diff --git a/command/rakp12.cpp b/command/rakp12.cpp index e5ea3a7..5963cef 100644 --- a/command/rakp12.cpp +++ b/command/rakp12.cpp @@ -17,8 +17,6 @@ namespace command std::vector<uint8_t> RAKP12(const std::vector<uint8_t>& inPayload, const message::Handler& handler) { - std::cout << ">> RAKP12\n"; - std::vector<uint8_t> outPayload(sizeof(RAKP2response)); auto request = reinterpret_cast<const RAKP1request*>(inPayload.data()); auto response = reinterpret_cast<RAKP2response*>(outPayload.data()); @@ -149,8 +147,6 @@ std::vector<uint8_t> RAKP12(const std::vector<uint8_t>& inPayload, // Insert the HMAC output into the payload outPayload.insert(outPayload.end(), output.begin(), output.end()); - - std::cout << "<< RAKP12\n"; return outPayload; } diff --git a/command/rakp34.cpp b/command/rakp34.cpp index 24deac0..71b1e52 100644 --- a/command/rakp34.cpp +++ b/command/rakp34.cpp @@ -67,7 +67,6 @@ void applyCryptAlgo(const uint32_t bmcSessionID) std::vector<uint8_t> RAKP34(const std::vector<uint8_t>& inPayload, const message::Handler& handler) { - std::cout << ">> RAKP34\n"; std::vector<uint8_t> outPayload(sizeof(RAKP4response)); auto request = reinterpret_cast<const RAKP3request*>(inPayload.data()); @@ -266,8 +265,6 @@ std::vector<uint8_t> RAKP34(const std::vector<uint8_t>& inPayload, applyCryptAlgo(session->getBMCSessionID()); session->state = session::State::ACTIVE; - - std::cout << "<< RAKP34\n"; return outPayload; } diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp index 706cfcd..e199532 100644 --- a/command/session_cmds.cpp +++ b/command/session_cmds.cpp @@ -12,7 +12,6 @@ namespace command std::vector<uint8_t> setSessionPrivilegeLevel( const std::vector<uint8_t>& inPayload, const message::Handler& handler) { - std::cout << ">> setSessionPrivilegeLevel\n"; std::vector<uint8_t> outPayload(sizeof(SetSessionPrivLevelResp)); auto request = reinterpret_cast<const SetSessionPrivLevelReq*> @@ -40,16 +39,12 @@ std::vector<uint8_t> setSessionPrivilegeLevel( // Requested level exceeds Channel and/or User Privilege Limit response->completionCode = IPMI_CC_EXCEEDS_USER_PRIV; } - - std::cout << "<< setSessionPrivilegeLevel\n"; return outPayload; } std::vector<uint8_t> closeSession(const std::vector<uint8_t>& inPayload, const message::Handler& handler) { - std::cout << ">> closeSession\n"; - std::vector<uint8_t> outPayload(sizeof(CloseSessionResponse)); auto request = reinterpret_cast<const CloseSessionRequest*> (inPayload.data()); @@ -73,8 +68,6 @@ std::vector<uint8_t> closeSession(const std::vector<uint8_t>& inPayload, response->completionCode = IPMI_CC_INVALID_SESSIONID; } } - - std::cout << "<< closeSession\n"; return outPayload; } diff --git a/command_table.cpp b/command_table.cpp index 7a6e2df..07ad157 100644 --- a/command_table.cpp +++ b/command_table.cpp @@ -6,6 +6,11 @@ #include "message_handler.hpp" #include "message_parsers.hpp" #include "sessions_manager.hpp" +#include <phosphor-logging/log.hpp> +#include <phosphor-logging/elog-errors.hpp> +#include "xyz/openbmc_project/Common/error.hpp" + +using namespace phosphor::logging; namespace command { @@ -16,14 +21,11 @@ void Table::registerCommand(CommandID inCommand, std::unique_ptr<Entry>&& entry) if (command) { - std::cout << "I> Already Registered, Skipping " << std::hex - << inCommand.command << "\n"; + log<level::DEBUG>("Already Registered", phosphor::logging::entry( + "SKIPPED_ENTRY=0x%x", uint32_t(inCommand.command))); return; } - std::cout << "I> Registering Command" << std::hex - << inCommand.command << "\n"; - command = std::move(entry); } diff --git a/provider_registration.cpp b/provider_registration.cpp index 98945a4..1a9b038 100644 --- a/provider_registration.cpp +++ b/provider_registration.cpp @@ -50,7 +50,6 @@ void registerCallbackHandlers(const char* providerLibPath) { handlerPath = providerLibPath; handlerPath += handlerList[numLibs]->d_name; - std::cout << "Registering handler: " << handlerPath << "\n"; auto lib_handler = dlopen(handlerPath.c_str(), RTLD_NOW); |