Update SEL Logger add function to accept additional metadata
This change makes the selAddSystemRecord() function a template
that can take additional metadata and pass it on to
sd_journal_send().
Tested: Sent various test messages that include additional
metadata and verified that it is correctly added to the journal
entry.
Change-Id: I43b4216d01124ce81915c092d34797b714dba787
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/include/sel_logger.hpp b/include/sel_logger.hpp
index aa9d8d6..28214e3 100644
--- a/include/sel_logger.hpp
+++ b/include/sel_logger.hpp
@@ -32,8 +32,8 @@
static constexpr size_t selEvtDataMaxSize = 3;
static constexpr size_t selOemDataMaxSize = 13;
-static uint16_t selAddSystemRecord(const std::string &message,
- const std::string &path,
- const std::vector<uint8_t> &selData,
- const bool &assert,
- const uint16_t &genId = selBMCGenID);
+template <typename... T>
+static uint16_t
+ selAddSystemRecord(const std::string &message, const std::string &path,
+ const std::vector<uint8_t> &selData, const bool &assert,
+ const uint16_t &genId, T &&... metadata);