railo-context.Component coldbox.system.logging.Logger
This is a logging object that allows for all kinds of logging to occur within its appenders
Constructor Summary | |
---|---|
init(any category, [any<numeric> levelMin='0'], [any<numeric> levelMax='4'], [any<struct> appenders='[runtime expression]'])
Create a new logger object. |
Method Summary | |
---|---|
void
|
addAppender(any<AbstractAppender> newAppender='')
Add a new appender to the list of appenders for this logger. |
any<Boolean>
|
appenderExists(any name)
Checks to see if a specified appender exists by name. |
any<Boolean>
|
canDebug()
Can log debug messages. |
any<Boolean>
|
canError()
Can log error messages. |
any<Boolean>
|
canFatal()
Can log fatal messages. |
any<Boolean>
|
canInfo()
Can log info messages. |
any<Boolean>
|
canLog(any<numeric> level)
Checks wether a log can be made on this Logger using a passed in level. |
any<Boolean>
|
canWarn()
Can log warn messages. |
void
|
debug(any message, [any extraInfo=''])
I log a debug message. |
void
|
error(any message, [any extraInfo=''])
I log an error message. |
void
|
fatal(any message, [any extraInfo=''])
I log a fatal message. |
any
|
getAppender(any name)
Get a named appender from this logger class. |
any<struct>
|
getAppenders()
Get all the registered appenders for this logger. |
any
|
getCategory()
Get the configured category for this logger. |
any<Boolean>
|
getlevelMax()
Get the level Max setting. |
any<numeric>
|
getlevelMin()
Get the level min setting. |
any<Logger>
|
getRootLogger()
Get the root logger. |
any<boolean>
|
hasAppenders()
Checks to see if we have registered any appenders yet. |
void
|
info(any message, [any extraInfo=''])
I log an information message. |
void
|
logMessage(any message, any<numeric> severity, [any extraInfo=''])
Write an entry into the loggers registered with this LogBox instance. |
void
|
removeAllAppenders()
Removes all appenders registered. |
any<Boolean>
|
removeAppender(any name)
Unregister an appender from this Logger. |
void
|
setCategory(any category)
Set the category for this logger. |
void
|
setLevelMax(any levelMax)
Set the appender's default levelMax. |
void
|
setLevelMin(any levelMin)
Set the appender's default levelMin. |
void
|
setRootLogger(any<Logger> RootLogger)
Set the root logger for this named logger. |
void
|
warn(any message, [any extraInfo=''])
I log a warning message. |
Methods inherited from class railo-context.Component |
---|
None |
Constructor Detail |
---|
Create a new logger object.
category
- The category name to use this logger withlevelMin
- 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 5. Optional. ex: LogBox.logLevels.WARNappenders
- A struct of already created appenders for this category, or blank to use the root logger.Method Detail |
---|
Add a new appender to the list of appenders for this logger. If the appender already exists, then it will not be added.
newAppender
- The new appender to add to this logger programmatically.Checks to see if a specified appender exists by name.
name
- The name of the appender to check if it is registeredCan log debug messages
Can log error messages
Can log fatal messages
Can log info messages
Checks wether a log can be made on this Logger using a passed in level
level
- The level to check if it can be logged in this LoggerCan log warn messages
I log a debug message.
message
- The message to log.extraInfo
- Extra information to send to the loggers.I log an error message.
message
- The message to log.extraInfo
- Extra information to send to the loggers.I log a fatal message.
message
- The message to log.extraInfo
- Extra information to send to the loggers.Get a named appender from this logger class. If the appender does not exists, it will throw an exception.
name
- The appender's nameGet all the registered appenders for this logger.
Get the configured category for this logger
Get the level Max setting
Get the level min setting
Get the root logger
Checks to see if we have registered any appenders yet
I log an information message.
message
- The message to log.extraInfo
- Extra information to send to the loggers.Write an entry into the loggers registered with this LogBox instance.
message
- The message to log.severity
- The severity level to log, if invalid, it will default to INFOextraInfo
- Extra information to send to the loggers.Removes all appenders registered
Unregister an appender from this Logger. True if successful or false otherwise.
name
- The name of the appender to unregisterSet the category for this logger
category
Set the appender's default levelMax
levelMax
Set the appender's default levelMin
levelMin
Set the root logger for this named logger.
RootLogger
I log a warning message.
message
- The message to log.extraInfo
- Extra information to send to the loggers.