log_manager: remove redundant createWithFFDC
Fold the functionality of creating an event entry with FFDC appended
into a common implementation to avoid code duplication and to ease
further extension and maintainability.
Build-tested with 'openpower-pel-extension' enabled.
Change-Id: I0f8151b782bf42cc7bc0981e58f6ab1e3cda080c
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
diff --git a/log_manager.hpp b/log_manager.hpp
index 3fe8fee..e47d6b5 100644
--- a/log_manager.hpp
+++ b/log_manager.hpp
@@ -190,28 +190,14 @@
* error log to be committed.
* @param[in] severity - level of the error
* @param[in] additionalData - The AdditionalData property for the error
+ * @param[in] ffdc - A vector of tuples that allows one to pass in file
+ * descriptors for files that contain FFDC (First
+ * Failure Data Capture). These will be passed to any
+ * event logging extensions.
*/
void create(const std::string& message, Severity severity,
- const std::map<std::string, std::string>& additionalData);
-
- /** @brief Creates an event log, and accepts FFDC files
- *
- * This is the same as create(), but also takes an FFDC argument.
- *
- * The FFDC argument is a vector of tuples that allows one to pass in file
- * descriptors for files that contain FFDC (First Failure Data Capture).
- * These will be passed to any event logging extensions.
- *
- * @param[in] errMsg - The error exception message associated with the
- * error log to be committed.
- * @param[in] severity - level of the error
- * @param[in] additionalData - The AdditionalData property for the error
- * @param[in] ffdc - A vector of FFDC file info
- */
- void
- createWithFFDC(const std::string& message, Severity severity,
- const std::map<std::string, std::string>& additionalData,
- const FFDCEntries& ffdc);
+ const std::map<std::string, std::string>& additionalData,
+ const FFDCEntries& ffdc = FFDCEntries{});
/** @brief Common wrapper for creating an Entry object
*
@@ -412,7 +398,7 @@
sdbusplus::message::unix_fd>>
ffdc) override
{
- manager.createWithFFDC(message, severity, additionalData, ffdc);
+ manager.create(message, severity, additionalData, ffdc);
}
private: