18 std::chrono::system_clock::time_point timestamp;
22 unsigned int repeatCount = 1;
25 static constexpr std::size_t CAPACITY = 64;
28 EngineErrorLog() =
default;
29 ~EngineErrorLog() =
default;
31 EngineErrorLog(
const EngineErrorLog& other) =
delete;
32 EngineErrorLog& operator=(
const EngineErrorLog& other) =
delete;
34 EngineErrorLog(EngineErrorLog && other) =
delete;
35 EngineErrorLog& operator=(EngineErrorLog && other) =
delete;
47 void push(std::string category, std::string source, std::string message);
59 const std::vector<Entry>&
entries()
const {
return m_entries; }
68 unsigned long long totalPushed()
const {
return m_totalPushed; }
71 std::vector<Entry> m_entries;
72 unsigned long long m_totalPushed = 0;
84void reportError(
const char* category, std::string source, std::string message);
91void setErrorSink(EngineErrorLog* sink);
void push(std::string category, std::string source, std::string message)
Record an error, dropping the oldest entries past CAPACITY.
void clearAll()
Drop every buffered entry.
const std::vector< Entry > & entries() const
The buffered entries.
Definition engine_error_log.h:59
unsigned long long totalPushed() const
Monotonic count of entries ever appended.
Definition engine_error_log.h:68