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>
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index 618aa54..1feef5b 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -408,7 +408,8 @@
 {
     sensor_data_t *reqptr = (sensor_data_t*)request;
 
-    printf("IPMI SET_SENSOR [0x%02x]\n",reqptr->sennum);
+    log<level::DEBUG>("IPMI SET_SENSOR",
+                      entry("SENSOR_NUM=0x%02x", reqptr->sennum));
 
     /*
      * This would support the Set Sensor Reading command for the presence
@@ -1002,29 +1003,21 @@
 void register_netfn_sen_functions()
 {
     // <Wildcard Command>
-    printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
-           NETFUN_SENSOR, IPMI_CMD_WILDCARD);
     ipmi_register_callback(NETFUN_SENSOR, IPMI_CMD_WILDCARD,
                            nullptr, ipmi_sen_wildcard,
                            PRIVILEGE_USER);
 
     // <Get Sensor Type>
-    printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
-           NETFUN_SENSOR, IPMI_CMD_GET_SENSOR_TYPE);
     ipmi_register_callback(NETFUN_SENSOR, IPMI_CMD_GET_SENSOR_TYPE,
                            nullptr, ipmi_sen_get_sensor_type,
                            PRIVILEGE_USER);
 
     // <Set Sensor Reading and Event Status>
-    printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
-           NETFUN_SENSOR, IPMI_CMD_SET_SENSOR);
     ipmi_register_callback(NETFUN_SENSOR, IPMI_CMD_SET_SENSOR,
                            nullptr, ipmi_sen_set_sensor,
                            PRIVILEGE_OPERATOR);
 
     // <Get Sensor Reading>
-    printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
-           NETFUN_SENSOR, IPMI_CMD_GET_SENSOR_READING);
     ipmi_register_callback(NETFUN_SENSOR, IPMI_CMD_GET_SENSOR_READING,
                            nullptr, ipmi_sen_get_sensor_reading,
                            PRIVILEGE_USER);