lucee.Component logbox.system.logging.LogBox
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This is LogBox, an enterprise logging library. Please remember to persist this class once it has been created. You can create as many instances of LogBox as you like. Just remember that you need to register loggers in it. It can be one or 1000, it all depends on you. By default, LogBox will log any warnings pertaining to itself in the CF logs according to its name.
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
struct
|
appenderRegistry
The appender registration map.
|
true
|
false
|
|
any
|
categoryAppenders
Category based appenders.
|
true
|
false
|
|
any
|
coldbox
ColdBox linkage class.
|
true
|
false
|
|
any
|
config
Configuration object.
|
true
|
false
|
|
any
|
logBoxID
The LogBox unique ID.
|
true
|
false
|
|
struct
|
loggerRegistry
The Logger registration map.
|
true
|
false
|
|
any
|
version
The LogBox operating version.
|
true
|
false
|
Constructor Summary | |
---|---|
init(LogBoxConfig config, [any coldbox=''])
Constructor. |
Method Summary | |
---|---|
any
|
configure(any<LogBoxConfig> config)
Configure logbox for operation. |
string
|
getAppenderRegistry()
|
struct
|
getAppendersMap(any appenders)
Get a map of appenders by list. |
string
|
getCategoryAppenders()
|
string
|
getColdbox()
|
string
|
getConfig()
|
string
|
getCurrentAppenders()
Get the list of currently instantiated appenders. |
string
|
getCurrentLoggers()
Get the list of currently instantiated loggers. |
string
|
getLogBoxID()
|
any
|
getLogger(any category)
Get a logger object configured with a category name and appenders. |
string
|
getLoggerRegistry()
|
any
|
getRootLogger()
Get the root logger object. |
private any
|
getUtil()
Get Utility Object. |
string
|
getVersion()
|
private any
|
locateCategoryParentLogger(any category)
Get a parent logger according to category convention inheritance. |
any
|
registerAppender(any name, any class, [struct properties='[runtime expression]'], [any layout=''], [numeric levelMin='0'], [numeric levelMax='4'])
Register a new appender object in the appender registry. |
any
|
setAppenderRegistry(struct appenderRegistry)
|
any
|
setCategoryAppenders(any categoryAppenders)
|
any
|
setColdbox(any coldbox)
|
any
|
setConfig(any config)
|
any
|
setLogBoxID(any logBoxID)
|
any
|
setLoggerRegistry(struct loggerRegistry)
|
any
|
setVersion(any version)
|
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
config
- The LogBoxConfig object to use to configure this instance of LogBoxcoldbox
- A coldbox application that this instance of logbox can be linked to.Property Detail |
---|
The appender registration map
access
- publicrequired
- falsereturntype
- anyserializable
- trueCategory based appenders
access
- publicrequired
- falsereturntype
- anyserializable
- trueColdBox linkage class
access
- publicrequired
- falsereturntype
- anyserializable
- trueConfiguration object
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe LogBox unique ID
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe Logger registration map
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe LogBox operating version
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Configure logbox for operation. You can also re-configure LogBox programmatically. Basically we register all appenders here and all categories
config
- The LogBoxConfig object to use to configure this instance of LogBox: logbox.system.logging.config.LogBoxConfigGet a map of appenders by list. Usually called to get a category of appenders
appenders
- The list of appenders to getGet the list of currently instantiated appenders.
Get the list of currently instantiated loggers.
Get a logger object configured with a category name and appenders. If not configured, then it reverts to the root logger defined for this instance of LogBox
category
- The category name to use in this logger or pass in the target object will log from and we will inspect the object and use its metadata nameGet the root logger object
Get Utility Object
Get a parent logger according to category convention inheritance. If not found, it returns the root logger.
category
- The category name to investigate for parentsRegister a new appender object in the appender registry.
name
- A unique name for the appender to register. Only unique names can be registered per variables.class
- The appender's class to register. We will create, init it and register it for you.properties
- The structure of properties to configure this appender with.layout
- The layout class to use in this appender for custom message renderinglevelMin
- The default log level for this appender, by default it is 0. Optional. ex: LogBox.logLevels.WARNlevelMax
- The default log level for this appender, by default it is 4. Optional. ex: LogBox.logLevels.WARNappenderRegistry
categoryAppenders
coldbox
config
logBoxID
loggerRegistry
version