class
LogRingBuffer
Ring buffer retained for post-crash log recovery. Producers are every thread in the process, so the slot write and the index advance have to be one atomic step — a mutex, not a pair of atomics.
- Module
- Logging
- Header
#include "Logging/AsyncLogger.h"- Namespace
Mowo- Template
template<size_t Capacity>
Constructors
| Signature | Name | Description |
|---|---|---|
LogRingBuffer() = default | LogRingBuffer |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | Push | |
bool | Pop | |
std::vector<LogMessage> | GetAll | Best-effort snapshot. |
void | Clear | |
bool | IsEmpty | |
size_t | Size |
Function details
LogRingBuffer
C++
LogRingBuffer() = defaultPush
C++
bool Push(const LogMessage& msg)Pop
C++
bool Pop(LogMessage& msg)GetAll
C++
std::vector<LogMessage> GetAll() constBest-effort snapshot. The crash handler runs on the faulting thread, which may itself hold m_mutex, so a failed lock reads on anyway rather than deadlocking and losing the dump entirely.
Clear
C++
void Clear()IsEmpty
C++
bool IsEmpty() constSize
C++
size_t Size() constGenerated from Logging/AsyncLogger.h via logging.json · Oct 27, 2026Version 1.0.0