Logger¶
class Logger
The logger class.
Base class used to perform logging. Implementations of this class have the ability to display or store log messages wherever they are needed.
Functions¶
Name | Description |
---|---|
~Logger | Default destructor. |
SetLogger | Sets the logger instance to use when calling amLogger |
GetLogger | Gets the logger instance to use when calling amLogger |
Debug | Logs a debug message. |
Info | Logs an informational message. |
Warning | Logs a warning message. |
Error | Logs an error message. |
Critical | Logs a critical message. |
Log | Logs a message with the given level. |
Function Details¶
Critical¶
void Critical(const char* file, int line, const AmString& message)
Logs a critical message.
- Parameter
file
- The file where the message was logged.
- Parameter
line
- The line where the message was logged.
- Parameter
message
- The message to log.
Debug¶
void Debug(const char* file, int line, const AmString& message)
Logs a debug message.
- Parameter
file
- The file where the message was logged.
- Parameter
line
- The line where the message was logged.
- Parameter
message
- The message to log.
Error¶
void Error(const char* file, int line, const AmString& message)
Logs an error message.
- Parameter
file
- The file where the message was logged.
- Parameter
line
- The line where the message was logged.
- Parameter
message
- The message to log.
GetLogger¶
static Logger* GetLogger()
Gets the logger instance to use when calling amLogger
- Return
- The logger instance.
Info¶
void Info(const char* file, int line, const AmString& message)
Logs an informational message.
- Parameter
file
- The file where the message was logged.
- Parameter
line
- The line where the message was logged.
- Parameter
message
- The message to log.
Log¶
virtual void Log(eLogMessageLevel level, const char* file, int line, const AmString& message) = 0
Logs a message with the given level.
- Parameter
level
- The level of the log message.
- Parameter
file
- The file where the message was logged.
- Parameter
line
- The line where the message was logged.
- Parameter
message
- The message to log.
SetLogger¶
static void SetLogger(Logger* loggerInstance)
Sets the logger instance to use when calling amLogger
- Parameter
loggerInstance
- The logger instance.
Warning¶
void Warning(const char* file, int line, const AmString& message)
Logs a warning message.
- Parameter
file
- The file where the message was logged.
- Parameter
line
- The line where the message was logged.
- Parameter
message
- The message to log.
~Logger¶
virtual ~Logger() = default
Default destructor.