Generate errorlog when timer expires waiting for host to shutdown

Fixes openbmc/openbmc#930

Change-Id: I1780071d5cbef23df88c17fe131098f54f54f25f
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/softoff/softoff.cpp b/softoff/softoff.cpp
index e88096f..88aa6cf 100644
--- a/softoff/softoff.cpp
+++ b/softoff/softoff.cpp
@@ -22,7 +22,7 @@
 namespace ipmi
 {
 
-/** @brief Send the SMS_ATN to host if value is set */
+// Sends the SMS_ATN to host if value is set
 void SoftPowerOff::sendSMSAttn()
 {
     using namespace std::chrono;
@@ -46,7 +46,13 @@
     return;
 }
 
-/** @brief Host Response handler */
+// Starts a timer
+int SoftPowerOff::startTimer(const std::chrono::microseconds& usec)
+{
+    return timer.startTimer(usec);
+}
+
+// Host Response handler
 auto SoftPowerOff::responseReceived(HostResponse response) -> HostResponse
 {
     using namespace std::chrono;
@@ -57,12 +63,19 @@
         // Need to stop the running timer and then start a new timer
         auto time = duration_cast<microseconds>(
                 seconds(IPMI_HOST_SHUTDOWN_COMPLETE_TIMEOUT_SECS));
-        auto r = timer.startTimer(time);
+        auto r = startTimer(time);
         if (r < 0)
         {
-            log<level::ERR>("Failure to start HostQuiesce wait timer",
+            log<level::ERR>("Failure to start Host shutdown wait timer",
                     entry("ERROR=%s", strerror(-r)));
         }
+        else
+        {
+            log<level::INFO>("Timer started waiting for host to shutdown",
+                    entry("TIMEOUT_IN_MSEC=%llu",
+                        duration_cast<milliseconds>(seconds
+                            (IPMI_HOST_SHUTDOWN_COMPLETE_TIMEOUT_SECS))));
+        }
     }
     else if (response == HostResponse::HostShutdown)
     {