Class Engine::LogWriter¶
ClassList > Engine > LogWriter
Single consumer of terminal log lines. More...
#include <LogWriter.hpp>
Public Static Attributes¶
| Type | Name |
|---|---|
| std::size_t | Capacity = 1024How many terminal lines are queued. Older lines are dropped. |
Public Functions¶
| Type | Name |
|---|---|
| void | Enqueue (LogLevel level, std::string message) Queues one line for the worker. |
| LogWriter () |
|
| LogWriter (const LogWriter &) = delete |
|
| void | Shutdown () Drains the queue and joins the worker. A second call does nothing. Safe when the thread was never started. |
| LogWriter & | operator= (const LogWriter &) = delete |
| ~LogWriter () |
Detailed Description¶
The caller never blocks on the terminal. When the queue is full, the oldest line is dropped. Shutdown joins the worker once. After that, further lines are written on the caller. The web build does not start this thread.
Public Static Attributes Documentation¶
variable Capacity¶
How many terminal lines are queued. Older lines are dropped.
Public Functions Documentation¶
function Enqueue¶
Queues one line for the worker.
Parameters:
levelStream and tag chosen by the worker.messageRaw message, without the terminal tag. Moved from.
function LogWriter [½]¶
function LogWriter [2/2]¶
function Shutdown¶
Drains the queue and joins the worker. A second call does nothing. Safe when the thread was never started.
function operator=¶
function ~LogWriter¶
The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Logging/LogWriter.hpp