Fix for missing phal traces in journal log
Added support to include traces provided by phal
callback functions to journal log.
Removed additional check to skip unwanted data from
phal call back , which is fixed in the latest libekb
logging.
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Change-Id: I43533f18f6efaded31bf57e8c10834def75f59ae
diff --git a/phalerror/phal_error.cpp b/phalerror/phal_error.cpp
index cecd399..698886b 100644
--- a/phalerror/phal_error.cpp
+++ b/phalerror/phal_error.cpp
@@ -31,17 +31,12 @@
{
va_list vap;
va_copy(vap, ap);
- std::vector<char> log(1 + std::vsnprintf(nullptr, 0, fmt, ap));
- std::vsnprintf(log.data(), log.size(), fmt, vap);
+ std::vector<char> logData(1 + std::vsnprintf(nullptr, 0, fmt, ap));
+ std::vsnprintf(logData.data(), logData.size(), fmt, vap);
va_end(vap);
- std::string logstr(log.begin(), log.end());
+ std::string logstr(logData.begin(), logData.end());
- // ignore stray characters in log traces coming from ekb
- // example: "\n", which are good for print to screen
- if (logstr.length() < 5)
- {
- return;
- }
+ log<level::INFO>(logstr.c_str());
char timeBuf[80];
time_t t = time(0);