summaryrefslogtreecommitdiffstats
path: root/log_manager_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'log_manager_main.cpp')
-rw-r--r--log_manager_main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/log_manager_main.cpp b/log_manager_main.cpp
index a3b26a3..b04c0e3 100644
--- a/log_manager_main.cpp
+++ b/log_manager_main.cpp
@@ -1,5 +1,6 @@
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/manager.hpp>
+#include <experimental/filesystem>
#include "config.h"
#include "log_manager.hpp"
@@ -12,6 +13,12 @@ int main(int argc, char *argv[])
phosphor::logging::Manager manager(bus, OBJ_INTERNAL);
+ // Create a directory to persist errors.
+ std::experimental::filesystem::create_directories(ERRLOG_PERSIST_PATH);
+
+ // Recreate error d-bus objects from persisted errors.
+ manager.restore();
+
bus.request_name(BUSNAME_LOGGING);
while(true)
OpenPOWER on IntegriCloud