Reduced excessive logging to the journal.
Fixes openbmc/openbmc#983
Change-Id: If52055feca8f965162948bd7af710da3ea9257d2
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/main.cpp b/main.cpp
index 13da385..4e1dbe8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -22,7 +22,7 @@
if (rc < 0)
{
- std::cerr << "E> SLP Error in Read : " << std::hex << rc << "\n";
+ std::cerr << "SLP Error in Read : " << std::hex << rc << "\n";
return rc;
}
@@ -30,15 +30,6 @@
{
case slp::VERSION_2:
{
- std::cout << "SLP Request" << "\n";
- //print the buffer
- std::for_each(recvBuff.begin(), recvBuff.end(),
- [](uint8_t & ch)
- {
- std::cout << std::hex << std::setfill('0')
- << std::setw(2) << (int)ch << ' ' ;
- });
- std::cout << "\n";
//Parse the buffer and construct the req object
std::tie(rc, req) = slp::parser::parseBuffer(recvBuff);
if (!rc)
@@ -49,6 +40,9 @@
break;
}
default:
+ std::cout << "SLP Unsupported Request Version="
+ << (int)recvBuff[0] <<"\n";
+
rc = static_cast<uint8_t>(slp::Error::VER_NOT_SUPPORTED);
break;
}
@@ -57,19 +51,10 @@
//or processing of request then handle the error.
if (rc)
{
- std::cerr << "E> SLP Error rc=" << rc << "\n";
+ std::cerr << "SLP Error rc=" << rc << "\n";
resp = slp::handler::processError(req, rc);
}
- //print and send the response
- std::cout << "SLP Response" << "\n";
- std::for_each(resp.begin(), resp.end(),
- [](uint8_t & ch)
- {
- std::cout << std::hex << std::setfill('0')
- << std::setw(2) << (int)ch << ' ' ;
- });
-
channel.write(resp);
return slp::SUCCESS;
}