PEL: Fixed serializing of elog properties

The PEL code modifies the Resolution and EventId properties on the
standard event log objects to fill them in with PEL specific values.  It
was originally doing this by using the resolution() and eventId()
override functions on the Entry object that would do the elog serialize
after it updated those properties.

Since then, the code was changed to instead call the resolution() and
eventId() functions that also take the bool skipSignal parameter, which
caused it to not call the overridden functions which meant those
properties weren't serialized and so not restored after a restart.

While we could just also override the functions that take that
skipSignal parameter to do the serialize, those get called when the
event log object is restored on startup, so it would cause unnecessary
calls to serialize.

Instead, just call the serialize() function directly after updating the
event ID and resolution when creating a PEL.

Tested:
The Resolution and EventId D-Bus properties are now correct after the
process is restarted.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8c1822e9c31925983feddab657644c98f37ef079
diff --git a/extensions/openpower-pels/manager.cpp b/extensions/openpower-pels/manager.cpp
index abc7be4..0894a45 100644
--- a/extensions/openpower-pels/manager.cpp
+++ b/extensions/openpower-pels/manager.cpp
@@ -16,6 +16,7 @@
 #include "manager.hpp"
 
 #include "additional_data.hpp"
+#include "elog_serialize.hpp"
 #include "json_utils.hpp"
 #include "pel.hpp"
 #include "pel_entry.hpp"
@@ -201,6 +202,7 @@
 
         updateEventId(pel);
         updateResolution(*pel);
+        serializeLogEntry(obmcLogID);
         createPELEntry(obmcLogID);
 
         // Check if firmware should quiesce system due to error
@@ -411,6 +413,7 @@
     updateDBusSeverity(*pel);
     updateEventId(pel);
     updateResolution(*pel);
+    serializeLogEntry(obmcLogID);
     createPELEntry(obmcLogID);
 
     // Check if firmware should quiesce system due to error
@@ -845,6 +848,15 @@
     return false;
 }
 
+void Manager::serializeLogEntry(uint32_t obmcLogID)
+{
+    auto entryN = _logManager.entries.find(obmcLogID);
+    if (entryN != _logManager.entries.end())
+    {
+        serialize(*entryN->second);
+    }
+}
+
 void Manager::updateDBusSeverity(const openpower::pels::PEL& pel)
 {
     // The final severity of the PEL may not agree with the
diff --git a/extensions/openpower-pels/manager.hpp b/extensions/openpower-pels/manager.hpp
index ca7f12e..02ffa0a 100644
--- a/extensions/openpower-pels/manager.hpp
+++ b/extensions/openpower-pels/manager.hpp
@@ -421,6 +421,12 @@
     void updateEventId(std::unique_ptr<openpower::pels::PEL>& pel);
 
     /**
+     * @brief Finds and serializes the log entry for the ID passed in.
+     * @param[in] obmcLogID - The OpenBMC event log ID
+     */
+    void serializeLogEntry(uint32_t obmcLogID);
+
+    /**
      * @brief Sets the FilePath of the specified error log entry to the PEL file
      *        path.
      *