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>
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 @@
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);
}