pinhole: generate log when pinhole reset occurs

A pinhole reset is an important event for system admins and service
personnel to be aware of. Create a log to record this event.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ied4036e71655c61761e1a0cc46c881116a45685e
diff --git a/bmc_state_manager.cpp b/bmc_state_manager.cpp
index b248b01..e522576 100644
--- a/bmc_state_manager.cpp
+++ b/bmc_state_manager.cpp
@@ -298,6 +298,13 @@
     {
         info("The BMC reset was caused by a pinhole reset");
         this->lastRebootCause(RebootCause::PinholeReset);
+
+        // Generate log telling user a pinhole reset has occurred
+        const std::string errorMsg = "xyz.openbmc_project.State.PinholeReset";
+        phosphor::state::manager::utils::createError(
+            this->bus, errorMsg,
+            sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
+                Notice);
     }
 
     return;