Class LoggerConfig

The LoggerConfig.

Logger object that is created via configuration. Subclassing LifeCycle, mixin-ing SetContext() and GetContext().

Info:

  • Copyright: GrayWolf64
  • License: Apache License 2.0

Functions

RootLoggerConfig:SetParent () Overrides LoggerConfig:SetParent().
RootLoggerConfig:GetParent () Overrides LoggerConfig:GetParent().

Local Functions

loggerconfig.ValidateAncestors (loggerConfig) Check if a LoggerConfig's ancestors exist and return its desired parent name.
loggerconfig.Create (name, config, level) Factory method to create a LoggerConfig.

Methods

loggerconfig:SetLevel (level) Sets the log Level.
loggerconfig:SetParent (T) Sets the parent of this LoggerConfig.
loggerconfig:GetParent () Gets the parent of this LoggerConfig.
loggerconfig:AddAppender (ap) Adds an Appender to the LoggerConfig.
loggerconfig:GetAppenders () Returns all Appenders configured by this LoggerConfig in a form of table (keys are Appenders, values are booleans).
loggerconfig:ClearAppenders () Removes all Appenders configured by this LoggerConfig.


Functions

RootLoggerConfig:SetParent ()
Overrides LoggerConfig:SetParent().

Returns:

    bool false
RootLoggerConfig:GetParent ()
Overrides LoggerConfig:GetParent().

Returns:

    bool false

Local Functions

loggerconfig.ValidateAncestors (loggerConfig)
Check if a LoggerConfig's ancestors exist and return its desired parent name.

Parameters:

  • loggerConfig LoggerConfig object
loggerconfig.Create (name, config, level)
Factory method to create a LoggerConfig.

Parameters:

  • name The name for the Logger
  • config The Configuration
  • level The Logging Level

Returns:

    object loggerconfig

Methods

loggerconfig:SetLevel (level)
Sets the log Level.

Parameters:

  • level The Logging Level
loggerconfig:SetParent (T)
Sets the parent of this LoggerConfig.

Parameters:

  • T LoggerConfig object or LoggerConfig name
loggerconfig:GetParent ()
Gets the parent of this LoggerConfig.

Returns:

    string lcname
loggerconfig:AddAppender (ap)
Adds an Appender to the LoggerConfig.

Parameters:

  • ap Appender object

Returns:

    bool ifadded
loggerconfig:GetAppenders ()
Returns all Appenders configured by this LoggerConfig in a form of table (keys are Appenders, values are booleans).

Returns:

    table appenders
loggerconfig:ClearAppenders ()
Removes all Appenders configured by this LoggerConfig.
generated by LDoc 1.5.0 Last updated 2023-07-17 09:58:50