Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::util::detail::LogBuffer Struct Reference

Classes

struct  LogRecord
 

Public Member Functions

void log (LogLevel level, uint32_t len, const char *msg)
 Logs a message. We implement a buffering strategy. Warnings and errors flush immediately. Otherwise, we flush once the buffer is filled or on-demand manually.
 
void flush ()
 
 LogBuffer (const LogBuffer &)=delete
 
 LogBuffer (LogBuffer &&)=delete
 
LogBufferoperator= (const LogBuffer &)=delete
 
LogBufferoperator= (LogBuffer &&)=delete
 

Public Attributes

char m_buffer [LOG_BUFFER_SIZE]
 
LogRecord m_recs [LOG_RECORD_LIMIT]
 
uint32_t m_buffer_pos = 0
 
uint32_t m_recs_pos = 0
 

Member Function Documentation

◆ log()

void gaia::util::detail::LogBuffer::log ( LogLevel  level,
uint32_t  len,
const char *  msg 
)
inline

Logs a message. We implement a buffering strategy. Warnings and errors flush immediately. Otherwise, we flush once the buffer is filled or on-demand manually.

Parameters
levelLogging level
lenLength of the messagage (including the null-terminating character)
msgMessage to log

The documentation for this struct was generated from the following file: