PEL: Create trace wrapper for peltool

In preparation for peltool being compiled for non-BMC platforms where
libphosphor_logging.so isn't available, create a wrapper function for
tracing so phosphor::logging::log() isn't directly used by the code that
is part of peltool.

For now, the wrapper will just call phosphor::logging::log, but in the
future will be changed to call std::cerr when not on the BMC.

A few files were changed to make use of the new calls.  Others will be
done with future commits.  Only the code that is built into peltool
needs to use this.  This mostly consists of the PEL section classes.

Using this new API does mean no extra data can be stored in the journal
metadata, as the systemd journal may not be available on some platforms
the tool may need to run on, such as AIX.  Instead, the data can just be
added into the trace string itself.

In a future commit, the meson.build file will be refactored to remove
the libphosphor_logging dependency so the build will fail if a call to
the phosphor-logging's log() is made within peltool code.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I5e6c235d60466b031e15b157860c07a3f8ddb148
diff --git a/extensions/openpower-pels/callouts.cpp b/extensions/openpower-pels/callouts.cpp
index 885dda5..ae95d3e 100644
--- a/extensions/openpower-pels/callouts.cpp
+++ b/extensions/openpower-pels/callouts.cpp
@@ -15,7 +15,9 @@
  */
 #include "callouts.hpp"
 
-#include <phosphor-logging/log.hpp>
+#include "trace.hpp"
+
+#include <algorithm>
 
 namespace openpower
 {
@@ -58,8 +60,7 @@
     }
     else
     {
-        using namespace phosphor::logging;
-        log<level::INFO>("Dropping PEL callout because at max");
+        trace::info("Dropping PEL callout because at max");
     }
 
     // Mapping including the  3 Medium levels as A,B and C
@@ -76,4 +77,4 @@
 
 } // namespace src
 } // namespace pels
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower