regulators: Store journal messages in error logs

The Journal::getMessages() method was recently implemented and merged.
This method can be used to obtain the N most recent journal messages
from a specified application.

Modify the error logging code to use this new method.  A method call was
already in the code, but it was commented out until the new method
became available.

The journal messages are stored in FFDC files that are eventually stored
in the error log as additional debug data.

Tested:
* Test where works
  * Verify returned messages are correct
  * Verify returned messages are stored in error log
  * Journal contains 0 messages for the specified application
  * Journal contains < 30 messages for the specified application
  * Journal contains > 30 messages for the specified application
* Test where fails
  * Verify exception is written to journal
  * Verify keeps looping to obtain journal messages from other applications

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I2cc07e19daa61a614611305d60fd318c48826d96
diff --git a/phosphor-regulators/src/error_logging.cpp b/phosphor-regulators/src/error_logging.cpp
index 37f00a9..309d9b6 100644
--- a/phosphor-regulators/src/error_logging.cpp
+++ b/phosphor-regulators/src/error_logging.cpp
@@ -156,13 +156,8 @@
         try
         {
             // Get recent journal messages from the executable
-            // TODO: Uncomment the following line and remove the temporary code
-            // when Journal::getMessages() is implemented
-            // std::vector<std::string> messages =
-            //   journal.getMessages("SYSLOG_IDENTIFIER", executable, 30);
-            std::vector<std::string> messages{
-                executable + ": journal message 1",
-                executable + ": journal message 2"};
+            std::vector<std::string> messages =
+                journal.getMessages("SYSLOG_IDENTIFIER", executable, 30);
 
             // Create FFDC file containing the journal messages
             if (!messages.empty())