1 #include "elog_entry.hpp" 2 3 #include "elog_serialize.hpp" 4 #include "log_manager.hpp" 5 6 namespace phosphor 7 { 8 namespace logging 9 { 10 11 // TODO Add interfaces to handle the error log id numbering 12 13 void Entry::delete_() 14 { 15 parent.erase(id()); 16 } 17 18 bool Entry::resolved(bool value) 19 { 20 auto current = 21 sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved(); 22 if (value != current) 23 { 24 value ? associations({}) : associations(assocs); 25 current = 26 sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved( 27 value); 28 29 uint64_t ms = std::chrono::duration_cast<std::chrono::milliseconds>( 30 std::chrono::system_clock::now().time_since_epoch()) 31 .count(); 32 updateTimestamp(ms); 33 34 serialize(*this); 35 } 36 37 return current; 38 } 39 40 } // namespace logging 41 } // namespace phosphor 42