summaryrefslogtreecommitdiffstats
path: root/ipmisensor.cpp
diff options
context:
space:
mode:
authorAditya Saripalli <adisarip@in.ibm.com>2017-11-09 14:46:27 +0530
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-04-18 21:02:48 +0000
commit5fb14603817baad7418b627ca41927d9ec7c4fc9 (patch)
tree91607e546db5d8bbee17e40c0c8b28c2aaa082c6 /ipmisensor.cpp
parent7ebd246403417294fc6fa1914967b6e60a92f062 (diff)
downloadphosphor-host-ipmid-5fb14603817baad7418b627ca41927d9ec7c4fc9.zip
phosphor-host-ipmid-5fb14603817baad7418b627ca41927d9ec7c4fc9.tar.gz
Reducing IPMI logging footprint
-host-ipmid is very noisy in terms of journal logging. A small step towards cleaning that up. -Also converted printfs to phosphor-logging. Partially Resolves openbmc/openbmc#2507 Change-Id: I749c19c18d1cabf6f0216830c8cb0a08ee43d6de Signed-off-by: Aditya Saripalli <aditya0124@gmail.com> Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Diffstat (limited to 'ipmisensor.cpp')
-rw-r--r--ipmisensor.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/ipmisensor.cpp b/ipmisensor.cpp
index 3bca4e7..2e987d0 100644
--- a/ipmisensor.cpp
+++ b/ipmisensor.cpp
@@ -238,19 +238,18 @@ int findindex(const uint8_t sensor_type, int offset, int *index) {
return rc;
}
-void debug_print_ok_to_dont_care(uint8_t stype, int offset)
-{
- printf("LOOKATME: Sensor should not be reported: Type 0x%02x, Offset 0x%02x\n",
- stype, offset);
-}
-
bool shouldReport(uint8_t sensorType, int offset, int *index) {
bool rc = false;
if (findindex(sensorType, offset, index)) { rc = true; }
-
- if (rc==false) { debug_print_ok_to_dont_care(sensorType, offset); }
+ if (rc == false) {
+#ifdef __IPMI_DEBUG__
+ log<level::DEBUG>("LOOKATME: Sensor should not be reported",
+ entry("SENSORTYPE=0x%02x", sensorType),
+ entry("OFFSET=0x%02x", offset));
+#endif
+ }
return rc;
}
OpenPOWER on IntegriCloud