|
Brenta Engine 1.0
|
#include <engine_logger.hpp>
Static Public Member Functions | |
| static void | Init () |
| Initialize the logger. | |
| static void | SetLogLevel (Brenta::Types::LogLevel level) |
| Set the log level. | |
| static void | SetLogFile (const std::string &file) |
| Set the log file. | |
| static void | Close () |
| Close the logger. | |
| template<typename T , typename... Args> | |
| static void | LogToStdout (T message, Args... args) |
| Log a message to stdout. | |
| template<typename T , typename... Args> | |
| static void | LogToFile (T message, Args... args) |
| Log a message to the log file. | |
| template<typename... Args> | |
| static void | Log (Brenta::Types::LogLevel level, Args... args) |
| Log a message. | |
Static Public Attributes | |
| static Brenta::Types::LogLevel | level = Brenta::Types::LogLevel::WARNING |
| Log level. | |
| static std::ofstream | log_file |
| Log file. | |
Logger class.
This class is used to log messages to the console and to a log file. The log messages can be filtered by log level.
Definition at line 56 of file engine_logger.hpp.
|
static |
Close the logger.
This method closes the logger. It should be called before the program exits.
Definition at line 48 of file engine_logger.cpp.
|
static |
Initialize the logger.
This method initializes the logger. It should be called before any other method of the logger is called.
Definition at line 43 of file engine_logger.cpp.
|
inlinestatic |
Log a message.
This method logs a message with the given log level. The message can be any number of arguments of any type. The message is printed to the console and to the log file if the log file is open.
| level | The log level |
| args | The message |
Definition at line 153 of file engine_logger.hpp.
|
inlinestatic |
Log a message to the log file.
This method logs a message with the given log level. The message can be any number of arguments of any type. The message is printed to the log file if the log file is open.
| level | The log level |
| args | The message |
Definition at line 137 of file engine_logger.hpp.
|
inlinestatic |
Log a message to stdout.
This method logs a message on stdout with the given log level. The message can be any number of arguments of any type.
| level | The log level |
| args | The message |
Definition at line 120 of file engine_logger.hpp.
|
static |
Set the log file.
This method sets the log file. The log file is used to store the messages that are printed to the console. The log file can be set to a file name.
| file | The log file |
Definition at line 53 of file engine_logger.cpp.
|
static |
Set the log level.
This method sets the log level. The log level is used to filter the messages that are printed to the console and to the log file. The log level can be set to DEBUG, INFO, WARNING, ERROR, or DISABLED.
| level | The log level |
Definition at line 38 of file engine_logger.cpp.
|
static |
Log level.
The log level is used to filter the messages that are printed to the console and to the log file. The log level can be set using the SetLogLevel method. Onlt the messages with a Loglevel greater or equal to the set log level are printed.
Definition at line 67 of file engine_logger.hpp.
|
static |
Log file.
The log file is used to store the messages that are printed to the console. The log file can be set using the SetLogFile method.
Definition at line 74 of file engine_logger.hpp.