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
log.h
Go to the documentation of this file.
1
8
9#ifndef ASW_LOG_H
10#define ASW_LOG_H
11
12#include <iostream>
13#include <string>
14
15namespace asw::log {
16
18 enum class Level { DEBUG, INFO, WARN, ERROR };
19
24 void setLevel(Level level);
25
30 void setOutput(std::ostream& stream);
31
36 void debug(const std::string& message);
37
42 void info(const std::string& message);
43
48 void warn(const std::string& message);
49
54 void error(const std::string& message);
55
56} // namespace asw::log
57
58#endif // ASW_LOG_H
Definition log.h:15
void info(const std::string &message)
Log an info message.
Definition log.cpp:84
void debug(const std::string &message)
Log a debug message.
Definition log.cpp:80
void setLevel(Level level)
Set the minimum log level (messages below this are ignored).
Definition log.cpp:72
void error(const std::string &message)
Log an error message.
Definition log.cpp:92
void warn(const std::string &message)
Log a warning message.
Definition log.cpp:88
void setOutput(std::ostream &stream)
Set the output stream (default: std::cerr).
Definition log.cpp:76
Level
Log severity levels.
Definition log.h:18