Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::Logger Class Reference

Central logging facility for the Raven engine. More...

#include <Logger.h>

Public Types

using Handler = std::variant<ConsoleHandler, FileHandler>

Static Public Member Functions

static void InitLog (const LogSettings &settings)
 Initializes the logging system and default handlers.
static void AddHandler (Handler handler)
 Adds a log handler.
static void SetLogLevel (const LogLevel level)
 Sets the minimum log level to output.
template<typename... Args>
static void Memory (std::string_view str, Args &&... args)
 Logs a memory-level message.
template<typename... Args>
static void Debug (std::string_view str, Args &&... args)
 Logs a debug-level message.
template<typename... Args>
static void Info (std::string_view str, Args &&... args)
 Logs an info-level message.
template<typename... Args>
static void Warning (std::string_view str, Args &&... args)
 Logs a warning-level message.
template<typename... Args>
static void Error (std::string_view str, Args &&... args)
 Logs an error-level message.
template<typename... Args>
static void Critical (std::string_view str, Args &&... args)
 Logs a critical-level message.
static LogSettingsGetSettings ()

Detailed Description

Central logging facility for the Raven engine.

Provides methods to log messages at different severity levels. Messages are formatted and dispatched to registered handlers (console or file). Thread-safe via internal mutex.

Member Typedef Documentation

◆ Handler

Member Function Documentation

◆ AddHandler()

void Raven::Logger::AddHandler ( Handler handler)
static

Adds a log handler.

Parameters
handlerA console or file handler variant to receive log output.

◆ Critical()

template<typename... Args>
void Raven::Logger::Critical ( std::string_view str,
Args &&... args )
inlinestatic

Logs a critical-level message.

◆ Debug()

template<typename... Args>
void Raven::Logger::Debug ( std::string_view str,
Args &&... args )
inlinestatic

Logs a debug-level message.

◆ Error()

template<typename... Args>
void Raven::Logger::Error ( std::string_view str,
Args &&... args )
inlinestatic

Logs an error-level message.

◆ GetSettings()

LogSettings & Raven::Logger::GetSettings ( )
inlinestatic
Returns
The settings struct populated by ini File.

◆ Info()

template<typename... Args>
void Raven::Logger::Info ( std::string_view str,
Args &&... args )
inlinestatic

Logs an info-level message.

◆ InitLog()

void Raven::Logger::InitLog ( const LogSettings & settings)
static

Initializes the logging system and default handlers.

◆ Memory()

template<typename... Args>
void Raven::Logger::Memory ( std::string_view str,
Args &&... args )
inlinestatic

Logs a memory-level message.

◆ SetLogLevel()

void Raven::Logger::SetLogLevel ( const LogLevel level)
inlinestatic

Sets the minimum log level to output.

Messages below this level will be ignored.

Parameters
levelThe minimum LogLevel to output.

◆ Warning()

template<typename... Args>
void Raven::Logger::Warning ( std::string_view str,
Args &&... args )
inlinestatic

Logs a warning-level message.


The documentation for this class was generated from the following files: