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