ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
asw::log Namespace Reference

Enumerations

enum class  Level { DEBUG , INFO , WARN , ERROR }
 Log severity levels. More...
 

Functions

void setLevel (Level level)
 Set the minimum log level (messages below this are ignored).
 
void setOutput (std::ostream &stream)
 Set the output stream (default: std::cerr).
 
void debug (const std::string &message)
 Log a debug message.
 
void info (const std::string &message)
 Log an info message.
 
void warn (const std::string &message)
 Log a warning message.
 
void error (const std::string &message)
 Log an error message.
 

Enumeration Type Documentation

◆ Level

enum class asw::log::Level
strong

Log severity levels.

Enumerator
DEBUG 
INFO 
WARN 
ERROR 

Definition at line 18 of file log.h.

Function Documentation

◆ debug()

void asw::log::debug ( const std::string & message)

Log a debug message.

Parameters
messageThe message to log.

Definition at line 80 of file log.cpp.

◆ error()

void asw::log::error ( const std::string & message)

Log an error message.

Parameters
messageThe message to log.

Definition at line 92 of file log.cpp.

◆ info()

void asw::log::info ( const std::string & message)

Log an info message.

Parameters
messageThe message to log.

Definition at line 84 of file log.cpp.

◆ setLevel()

void asw::log::setLevel ( Level level)

Set the minimum log level (messages below this are ignored).

Parameters
levelThe minimum level to log.

Definition at line 72 of file log.cpp.

◆ setOutput()

void asw::log::setOutput ( std::ostream & stream)

Set the output stream (default: std::cerr).

Parameters
streamThe output stream to write log messages to.

Definition at line 76 of file log.cpp.

◆ warn()

void asw::log::warn ( const std::string & message)

Log a warning message.

Parameters
messageThe message to log.

Definition at line 88 of file log.cpp.