Class Logger
The core implementation of the Logger interface.
Info:
- Copyright: GrayWolf64
- License: Apache License 2.0
Local Functions
logger.LogIfEnabled (self, level, msg) | Logs a message if the specified level is active. |
Methods
logger:GetContext (ex) | Gets the LoggerContext of the Logger. |
logger:SetLoggerConfig (name) | Sets the LoggerConfig name for the Logger. |
logger:GetLoggerConfig () | Get the LoggerConfig of the Logger. |
logger:Always () | Construct a log event that will always be logged. |
logger:AtTrace () | Construct a trace log event. |
logger:AtDebug () | Construct a debug log event. |
logger:AtInfo () | Construct a info log event. |
logger:AtWarn () | Construct a warn log event. |
logger:AtError () | Construct a error log event. |
logger:AtFatal () | Construct a fatal log event. |
Local Functions
- logger.LogIfEnabled (self, level, msg)
-
Logs a message if the specified level is active.
Parameters:
- self
- level
- msg
Methods
- logger:GetContext (ex)
-
Gets the LoggerContext of the Logger.
Parameters:
- ex True for getting the object, false or nil for getting the name
Returns:
- string ctxname
- object ctx
- logger:SetLoggerConfig (name)
-
Sets the LoggerConfig name for the Logger.
Parameters:
- name String name
- logger:GetLoggerConfig ()
-
Get the LoggerConfig of the Logger.
Returns:
-
object loggerconfig
- logger:Always ()
-
Construct a log event that will always be logged.
Returns:
-
object LogEvent
- logger:AtTrace ()
- Construct a trace log event.
- logger:AtDebug ()
- Construct a debug log event.
- logger:AtInfo ()
- Construct a info log event.
- logger:AtWarn ()
- Construct a warn log event.
- logger:AtError ()
- Construct a error log event.
- logger:AtFatal ()
- Construct a fatal log event.