diff options
author | Matt Spinler <spinler@us.ibm.com> | 2019-07-17 13:54:30 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2019-08-05 12:49:54 -0500 |
commit | 89fa082a68c975128db6fa96eab33200c6bc7bb6 (patch) | |
tree | 30ef8f010c8431536b631c47fa54bab43ecc2f51 /extensions/openpower-pels/manager.hpp | |
parent | cb6b059eec52ddfe099221de003d7dca86ce1db0 (diff) | |
download | phosphor-logging-89fa082a68c975128db6fa96eab33200c6bc7bb6.tar.gz phosphor-logging-89fa082a68c975128db6fa96eab33200c6bc7bb6.zip |
PEL: Add repository to save PELs
Create the Repository class that can save PELs in (and later retrieve
them from) the filesystem. It provides an add() method that can add
a PEL object to the repository.
Now, when the Manager class sees an OpenBMC event log created with the
RAWPEL metadata in the AdditionalData property that points at a file
that contains a PEL, it can save that PEL. Before the PEL is saved, the
log ID and commit timestamp fields in the PEL will be updated - the log
ID to a unique value, and the timestamp to the current time.
Change-Id: I8dbaddf0f155bcb6d40b933294ada83feb75ce53
Diffstat (limited to 'extensions/openpower-pels/manager.hpp')
-rw-r--r-- | extensions/openpower-pels/manager.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/extensions/openpower-pels/manager.hpp b/extensions/openpower-pels/manager.hpp index e57be98..3134f23 100644 --- a/extensions/openpower-pels/manager.hpp +++ b/extensions/openpower-pels/manager.hpp @@ -2,6 +2,8 @@ #include "elog_entry.hpp" #include "log_manager.hpp" +#include "paths.hpp" +#include "repository.hpp" namespace openpower { @@ -28,7 +30,8 @@ class Manager * * @param[in] logManager - internal::Manager object */ - explicit Manager(internal::Manager& logManager) : _logManager(logManager) + explicit Manager(internal::Manager& logManager) : + _logManager(logManager), _repo(getPELRepoPath()) { } @@ -96,6 +99,11 @@ class Manager * @brief Reference to phosphor-logging's Manager class */ internal::Manager& _logManager; + + /** + * @brief The PEL repository object + */ + Repository _repo; }; } // namespace pels |