Log message cleanup
Removed std::endl from log messages.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: Iec49cfb9d1c6fef8bdea2c88e203c45093e2973d
diff --git a/attn/attn_handler.cpp b/attn/attn_handler.cpp
index af62771..65d980a 100644
--- a/attn/attn_handler.cpp
+++ b/attn/attn_handler.cpp
@@ -62,37 +62,33 @@
proc = pdbg_target_index(target); // get processor number
std::stringstream ss; // log message stream
- ss << "checking processor " << proc << std::endl;
+ ss << "checking processor " << proc;
log<level::INFO>(ss.str().c_str());
// get active attentions on processor
if (RC_SUCCESS != fsi_read(target, 0x1007, &isr_val))
{
- std::stringstream ss; // log message stream
- ss << "Error! cfam read 0x1007 FAILED" << std::endl;
- log<level::INFO>(ss.str().c_str());
+ log<level::INFO>("Error! cfam read 0x1007 FAILED");
}
else
{
std::stringstream ss; // log message stream
ss << "cfam 0x1007 = 0x";
ss << std::hex << std::setw(8) << std::setfill('0');
- ss << isr_val << std::endl;
+ ss << isr_val;
log<level::INFO>(ss.str().c_str());
// get interrupt enabled special attentions mask
if (RC_SUCCESS != fsi_read(target, 0x100d, &isr_mask))
{
- std::stringstream ss; // log message stream
- ss << "Error! cfam read 0x100d FAILED" << std::endl;
- log<level::INFO>(ss.str().c_str());
+ log<level::INFO>("Error! cfam read 0x100d FAILED");
}
else
{
std::stringstream ss; // log message stream
ss << "cfam 0x100d = 0x";
ss << std::hex << std::setw(8) << std::setfill('0');
- ss << isr_mask << std::endl;
+ ss << isr_mask;
log<level::INFO>(ss.str().c_str());
// bit 0 on "left": bit 30 = SBE vital attention
@@ -153,15 +149,11 @@
{
int rc = RC_NOT_SUCCESS; // vital attention handling not yet supported
- std::stringstream ss; // log message stream
- ss << "vital" << std::endl;
- log<level::INFO>(ss.str().c_str());
+ log<level::INFO>("vital");
if (RC_SUCCESS != rc)
{
- std::stringstream ss; // log message stream
- ss << "vital NOT handled" << std::endl;
- log<level::INFO>(ss.str().c_str());
+ log<level::INFO>("vital NOT handled");
}
return rc;
@@ -174,14 +166,10 @@
{
int rc = RC_SUCCESS; // checkstop handling supported
- std::stringstream ss; // log message stream
- ss << "checkstop" << std::endl;
- log<level::INFO>(ss.str().c_str());
+ log<level::INFO>("checkstop");
analyzer::analyzeHardware();
- // TODO recoverable errors?
-
return rc;
}
@@ -192,17 +180,14 @@
{
int rc = RC_SUCCESS; // special attention handling supported
- std::stringstream ss; // log message stream
-
- ss << "special" << std::endl;
+ log<level::INFO>("special");
// Right now we always handle breakpoint special attentions if breakpoint
// attn handling is enabled. This will eventually check if breakpoint attn
// handing is enabled AND there is a breakpoint pending.
if (0 != (i_attention->getFlags() & enableBreakpoints))
{
- ss << "breakpoint" << std::endl;
- log<level::INFO>(ss.str().c_str());
+ log<level::INFO>("breakpoint");
// Call the breakpoint special attention handler
bpHandler();
@@ -213,8 +198,7 @@
// handling is enbaled or not.
else
{
- ss << "TI (terminate immediately)" << std::endl;
- log<level::INFO>(ss.str().c_str());
+ log<level::INFO>("TI (terminate immediately)");
// Call TI special attention handler
tiHandler();