Class LoggerContext

The LoggerContext, which is the anchor for the logging system.

Subclassing LifeCycle. It maintains a list of all the loggers requested by users and a reference to the Configuration.

Info:

  • Copyright: GrayWolf64
  • License: Apache License 2.0

Local Functions

loggercontext.registerLContext (name, withconfig) Register a LoggerContext.
loggercontext.getLoggerCount () Get the number of Loggers across all the LoggerContexts.

Methods

loggercontext:SetConfigurationSource (src) Sets the Configuration source for the LoggerContext.
loggercontext:GetConfigurationSource () Gets where this LoggerContext is declared.
loggercontext:GetLogger (name) Gets a Logger from the Context.
loggercontext:GetLoggers () Gets a table of the current loggers.
loggercontext:GetConfiguration () Returns the current Configuration of the LoggerContext.
loggercontext:SetConfiguration (config) Sets the Configuration to be used.
loggercontext:Terminate () Terminate the LoggerContext.
loggercontext:HasLogger (name) Determines if the specified Logger exists.


Local Functions

loggercontext.registerLContext (name, withconfig)
Register a LoggerContext.

Parameters:

  • name The name of the LoggerContext
  • withconfig Whether or not come with a DefaultConfiguration, leaving it nil will make it come with one

Returns:

    object loggercontext
loggercontext.getLoggerCount ()
Get the number of Loggers across all the LoggerContexts.

Returns:

    number count

Methods

loggercontext:SetConfigurationSource (src)
Sets the Configuration source for the LoggerContext.

Parameters:

  • src String source
loggercontext:GetConfigurationSource ()
Gets where this LoggerContext is declared.

Returns:

    table source
loggercontext:GetLogger (name)
Gets a Logger from the Context.

Parameters:

  • name The name of the Logger
loggercontext:GetLoggers ()
Gets a table of the current loggers.

Returns:

    table loggers
loggercontext:GetConfiguration ()
Returns the current Configuration of the LoggerContext.

Returns:

    object configuration
loggercontext:SetConfiguration (config)
Sets the Configuration to be used.

Parameters:

  • config Configuration
loggercontext:Terminate ()
Terminate the LoggerContext.
loggercontext:HasLogger (name)
Determines if the specified Logger exists.

Parameters:

  • name The name of the Logger to check

Returns:

    bool haslogger
generated by LDoc 1.5.0 Last updated 2023-07-17 09:58:50