Fix entries used by phosphor-logging
Fixed entires used by phosphor::logging::log function. Now logs
display proper information.
Tested: - Verified if logs contain correct entries
Change-Id: I5254555aa55bbe06c882d7024db911812e6f3f63
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
diff --git a/src/sensor.cpp b/src/sensor.cpp
index 8a6f673..8b4fe01 100644
--- a/src/sensor.cpp
+++ b/src/sensor.cpp
@@ -39,8 +39,8 @@
weakSelf = weak_from_this()](boost::system::error_code ec) {
phosphor::logging::log<phosphor::logging::level::WARNING>(
"DBus 'GetProperty' call failed on Sensor Value",
- phosphor::logging::entry("sensor=%s, ec=%lu", id.str().c_str(),
- ec.value()));
+ phosphor::logging::entry("SENSOR_PATH=%s", id.path.c_str()),
+ phosphor::logging::entry("ERROR_CODE=%d", ec.value()));
},
[lock, weakSelf = weak_from_this()](double newValue) {
if (auto self = weakSelf.lock())
@@ -147,7 +147,7 @@
phosphor::logging::log<phosphor::logging::level::ERR>(
"Failed to receive Value from Sensor "
"PropertiesChanged signal",
- phosphor::logging::entry("sensor=%s",
+ phosphor::logging::entry("SENSOR_PATH=%s",
self->sensorId.path.c_str()));
}
}