1 #include "faultlog_dump_entry.hpp"
2 
3 #include <phosphor-logging/lg2.hpp>
4 
5 namespace phosphor
6 {
7 namespace dump
8 {
9 namespace faultlog
10 {
11 
delete_()12 void Entry::delete_()
13 {
14     lg2::info("In faultlog_dump_entry.cpp delete_()");
15 
16     // Delete Dump file from Permanent location
17     try
18     {
19         std::filesystem::remove(file);
20     }
21     catch (const std::filesystem::filesystem_error& e)
22     {
23         // Log Error message and continue
24         lg2::error("Failed to delete dump file, errormsg: {ERROR}", "ERROR", e);
25     }
26 
27     // Remove Dump entry D-bus object
28     phosphor::dump::Entry::delete_();
29 }
30 
31 } // namespace faultlog
32 } // namespace dump
33 } // namespace phosphor
34