lucee.Component coldbox.system.logging.config.LogBoxConfig
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This is a LogBox configuration object. You can use it to configure a LogBox instance.
Constructor Summary | |
---|---|
init([any CFCConfig], [string CFCConfigPath])
Constructor. |
Method Summary | |
---|---|
LogBoxConfig
|
appender(any name, any class, [struct properties='[runtime expression]'], [any layout=''], [any levelMin='0'], [any levelMax='4'])
Add an appender configuration. |
LogBoxConfig
|
category(any name, [any levelMin='0'], [any levelMax='4'], [any appenders='*'])
Add a new category configuration with appender(s). |
boolean
|
categoryExists(any name)
Check if a category definition exists. |
private struct
|
convertLevels(any target)
Convert levels from an incoming structure of data. |
LogBoxConfig
|
debug()
Add categories to the DEBUG level. |
LogBoxConfig
|
error()
Add categories to the ERROR level. |
LogBoxConfig
|
fatal()
Add categories to the FATAL level. |
struct
|
getAllAppenders()
Get all the configured appenders. |
struct
|
getAllCategories()
Get the configured categories. |
struct
|
getCategory(any name)
Get a specified category definition. |
struct
|
getMemento()
Get the instance memento. |
struct
|
getRoot()
Get the root logger definition. |
LogBoxConfig
|
info()
Add categories to the INFO level. |
private any
|
levelChecks(any levelMin, any levelMax)
Level checks on incoming levels. |
LogBoxConfig
|
loadDataDSL(struct rawDSL)
Load a data configuration CFC data DSL. |
LogBoxConfig
|
off()
Add categories to the OFF level. |
LogBoxConfig
|
reset()
Reset the configuration. |
LogBoxConfig
|
resetAppenders()
Reset appender configuration. |
LogBoxConfig
|
resetCategories()
Reset categories configuration. |
LogBoxConfig
|
resetRoot()
Reset root configuration. |
LogBoxConfig
|
root(any appenders, [any levelMin='0'], [any levelMax='4'])
Add an appender configuration. |
LogBoxConfig
|
validate()
Validates the configuration. |
LogBoxConfig
|
warn()
Add categories to the WARN level. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
CFCConfig
- The logBox Data Configuration CFCCFCConfigPath
- The logBox Data Configuration CFC path to useMethod Detail |
---|
Add an appender configuration
name
- A unique name for the appender to register. Only unique names can be registered per instanceclass
- The appender's class to register. We will create, init it and register it for youproperties
- The structure of properties to configure this appender with.layout
- The layout class path to use in this appender for custom message rendering.levelMin
- The default log level for the root logger, by default it is 0 (FATAL). Optional. ex: config.logLevels.WARNlevelMax
- The default log level for the root logger, by default it is 4 (DEBUG). Optional. ex: config.logLevels.WARNAdd a new category configuration with appender(s). Appenders MUST be defined first, else this method will throw an exception
name
- A unique name for the appender to register. Only unique names can be registered per instancelevelMin
- The default log level for the root logger, by default it is 0 (FATAL). Optional. ex: config.logLevels.WARNlevelMax
- The default log level for the root logger, by default it is 4 (DEBUG). Optional. ex: config.logLevels.WARNappenders
- A list of appender names to configure this category with. By default it uses all the registered appendersCheck if a category definition exists
name
- The category nameConvert levels from an incoming structure of data
target
- The structure to look for elements: LevelMin and LevelMaxAdd categories to the DEBUG level. Send each category as an argument.
Add categories to the ERROR level. Send each category as an argument.
Add categories to the FATAL level. Send each category as an argument.
Get all the configured appenders
Get the configured categories
Get a specified category definition
name
- The category nameGet the instance memento
Get the root logger definition
Add categories to the INFO level. Send each category as an argument.
Level checks on incoming levels
levelMin
- truelevelMax
- trueLoad a data configuration CFC data DSL
rawDSL
- The data configuration DSL structureAdd categories to the OFF level. Send each category as an argument.
Reset the configuration
Reset appender configuration
Reset categories configuration
Reset root configuration
Add an appender configuration
appenders
- A list of appenders to configure the root logger with. Send a * to add all appenderslevelMin
- The default log level for the root logger, by default it is 0 (FATAL). Optional. ex: config.logLevels.WARNlevelMax
- The default log level for the root logger, by default it is 4 (DEBUG). Optional. ex: config.logLevels.WARNValidates the configuration. If not valid, it will throw an appropriate exception.
Add categories to the WARN level. Send each category as an argument.