Class Engine::LogBuffer¶
ClassList > Engine > LogBuffer
Process-wide ring of the most recent user error messages. More...
#include <LogBuffer.hpp>
Public Static Attributes¶
| Type | Name |
|---|---|
| std::size_t | Capacity = 512How many lines are kept. Older lines are overwritten. |
Public Functions¶
| Type | Name |
|---|---|
| void | CopyEntriesInOrder (std::vector< LogEntry > & out) const Copies stored lines from oldest to newest. |
| LogBuffer () |
|
| void | Push (LogLevel level, const std::string & message) Appends one line, overwriting the oldest when the ring is full. |
Detailed Description¶
Push and CopyEntriesInOrder share one mutex. Capacity is fixed; Push drops the oldest line once full. Engine lines are not stored here.
Public Static Attributes Documentation¶
variable Capacity¶
How many lines are kept. Older lines are overwritten.
Public Functions Documentation¶
function CopyEntriesInOrder¶
Copies stored lines from oldest to newest.
Parameters:
outCleared, then filled. Capacity is reused when it is already large enough.
function LogBuffer¶
function Push¶
Appends one line, overwriting the oldest when the ring is full.
Parameters:
levelSeverity stored with the line.messageRaw message, without the terminal tag.
The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Logging/LogBuffer.hpp