summaryrefslogtreecommitdiffstats
path: root/storagehandler.cpp
diff options
context:
space:
mode:
authorNagaraju Goruganti <ngorugan@in.ibm.com>2018-04-29 22:38:40 -0500
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-05-08 21:48:04 +0000
commit8960b7c2ed473624932c1cf407b94310881308e6 (patch)
treed4247fb7f0c017c2eada5bd7baf6c1575f1cf0b8 /storagehandler.cpp
parente98d146addcab8a25037f927673c0616cde7d962 (diff)
downloadphosphor-host-ipmid-8960b7c2ed473624932c1cf407b94310881308e6.tar.gz
phosphor-host-ipmid-8960b7c2ed473624932c1cf407b94310881308e6.zip
Fix Host time is not getting printed to journal
log<level::DEBUG> is not putting Host time into journal, instead it is putting it in the metadata. Made fix for it. Testing: ipmitool sel time get # Host time:xxx XXX x xx:xx:xx xxxx will be # printed in into journal Change-Id: I0ba72a871469a30c605ee3ec91a07787959d5ae3 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Diffstat (limited to 'storagehandler.cpp')
-rw-r--r--storagehandler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 3f1ebe2..c020948 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -433,6 +433,7 @@ ipmi_ret_t ipmi_storage_get_sel_time(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
using namespace std::chrono;
uint64_t host_time_usec = 0;
uint32_t resp = 0;
+ std::stringstream hostTime;
try
{
@@ -469,8 +470,9 @@ ipmi_ret_t ipmi_storage_get_sel_time(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
return IPMI_CC_UNSPECIFIED_ERROR;
}
- log<level::DEBUG>("Host time:",
- entry("HOST_TIME=%s", getTimeString(host_time_usec)));
+ hostTime << "Host time:" << getTimeString(host_time_usec);
+ log<level::DEBUG>(hostTime.str().c_str());
+
// Time is really long int but IPMI wants just uint32. This works okay until
// the number of seconds since 1970 overflows uint32 size.. Still a whole
OpenPOWER on IntegriCloud