ark::supervisor::CrashReporter
Defined in header “ark/supervisor/crash_reporter.hh”.
This class allows higher level code to report a crash report as a blob of text, which can be written to disk in a ring buffer.
Methods
-
CrashReporter(std::filesystem::path base_path, size_t ring_buffer_size)
Constructor. Creates the crash reporter in the given base path, with the specified ring buffer size. The ring buffer size count will indicate the number of reports that are saved on disk. Older reports will be removed in ring-buffer fashion. -
std::optional< std::filesystem::path > save_report(const std::string_view & process_name, const std::string_view & content)
Save the given block of text as a ‘crash report’ to the ring buffer. Will not throw; any error saving a report is written out as a debug log entry instead.If a report was saved to disk, returns the path to said report.