Logger class
#include <include/engine/util/logger.h>
A simple logger utility for the engine and client.
Supports console output and optional file output. Formats messages with file, line, and severity information.
Public static functions
Public functions
- void Init(const std::string& filename = "")
- Initializes the logger.
- void Log(LogLevel level, const char* file, int line, const char* format, ...)
- Logs a message with the specified severity.
- auto IsInitialized() const -> bool
- Returns whether the logger has been initialized.
Function documentation
void engine:: util:: Logger:: Init(const std::string& filename = "")
Initializes the logger.
| Parameters | |
|---|---|
| filename | Optional filename for log output. |
If a filename is provided, logs will be written to "logs/<filename>". Otherwise, it logs only to the console.