Commit OCC related errors as informational

Since the PELs generated by occ-control will end up triggering a PM
Complex reset, they can get logged as informational. Hostboot/HTMGT will
determine when recovery attempts has been exhausted and will log an
unrecoverable 2616 PEL indicating the system is in safe mode.

Change-Id: Iab3d3a5d1605a4fea7362b96f5e05570cd0a1746
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_command.cpp b/occ_command.cpp
index 39bcae6..1620156 100644
--- a/occ_command.cpp
+++ b/occ_command.cpp
@@ -17,7 +17,7 @@
 #include <memory>
 #include <string>
 
-//#define TRACE_PACKETS
+// #define TRACE_PACKETS
 
 namespace open_power
 {
diff --git a/occ_ffdc.cpp b/occ_ffdc.cpp
index 3f10dbe..633914b 100644
--- a/occ_ffdc.cpp
+++ b/occ_ffdc.cpp
@@ -42,7 +42,10 @@
         uint8_t, uint8_t, sdbusplus::message::unix_fd>>
         pelFFDCInfo;
 
-    log<level::INFO>("Creating PEL with SBE FFDC", entry("SRC6=%08x", src6));
+    log<level::INFO>(
+        fmt::format("Creating PEL for OCC{} with SBE FFDC: {} - SRC6: 0x{:08X}",
+                    src6 >> 16, path, src6)
+            .c_str());
 
     if (fd > 0)
     {
@@ -66,10 +69,13 @@
         auto method =
             bus.new_method_call(service.c_str(), loggingObjectPath,
                                 opLoggingInterface, "CreatePELWithFFDCFiles");
+        // Set level to Notice (Informational). Error should trigger an OCC
+        // reset and if it does not recover, HTMGT/HBRT will create an
+        // unrecoverable error.
         auto level =
             sdbusplus::xyz::openbmc_project::Logging::server::convertForMessage(
                 sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
-                    Error);
+                    Notice);
         method.append(path, level, additionalData, pelFFDCInfo);
         auto response = bus.call(method);
         std::tuple<uint32_t, uint32_t> reply = {0, 0};
@@ -79,7 +85,8 @@
     }
     catch (const sdbusplus::exception_t& e)
     {
-        log<level::ERR>("Failed to create PEL");
+        log<level::ERR>(
+            fmt::format("Failed to create PEL: {}", e.what()).c_str());
     }
 
     return plid;
@@ -104,6 +111,10 @@
 
     additionalData.emplace("OCC", std::to_string(instance));
 
+    log<level::INFO>(
+        fmt::format("Creating OCC Reset PEL for OCC{}: {}", instance, path)
+            .c_str());
+
     auto& bus = utils::getBus();
 
     try
@@ -112,17 +123,21 @@
             utils::getService(loggingObjectPath, loggingInterface);
         auto method = bus.new_method_call(service.c_str(), loggingObjectPath,
                                           loggingInterface, "Create");
+        // Set level to Notice (Informational). Error should trigger an OCC
+        // reset and if it does not recover, HTMGT/HBRT will create an
+        // unrecoverable error.
         auto level =
             sdbusplus::xyz::openbmc_project::Logging::server::convertForMessage(
                 sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
-                    Error);
+                    Notice);
         method.append(path, level, additionalData);
         bus.call(method);
     }
     catch (const sdbusplus::exception_t& e)
     {
         log<level::ERR>(
-            fmt::format("Failed to create PEL: {}", e.what()).c_str());
+            fmt::format("Failed to create OCC Reset PEL: {}", e.what())
+                .c_str());
     }
 }
 
diff --git a/powermode.hpp b/powermode.hpp
index b5200d4..5363c2c 100644
--- a/powermode.hpp
+++ b/powermode.hpp
@@ -6,7 +6,6 @@
 #include "occ_command.hpp"
 
 #include <cereal/archives/json.hpp>
-//#include <cereal/archives/binary.hpp>
 #include <cereal/cereal.hpp>
 #include <cereal/types/string.hpp>
 #include <cereal/types/tuple.hpp>