|
ColdBox Platform Version 2.6.4 | ||||
| FRAMES | |||||
WEB-INF.cftags.component
coldbox.system.logging.Logger
public class Logger
This is a logging object that allows for all kinds of logging to occur within its appenders
| Constructor Summary | |
|---|---|
init(string category, [numeric levelMin='0'], [numeric levelMax='4'], [struct appenders='[runtime expression]'])
Create a new logger object |
|
| Method Summary | |
|---|---|
private any |
$throw(string message, [string detail=''], [string type='Framework'])
Facade for cfthrow |
void |
addAppender(AbstractAppender newAppender='')
Add a new appender to the list of appenders for this logger |
boolean |
appenderExists(string name)
Checks to see if a specified appender exists by name |
boolean |
canLog(numeric level)
Checks wether a log can be made on this Logger using a passed in level |
void |
debug(string message, [any extraInfo=''])
I log a debug message |
void |
error(string message, [any extraInfo=''])
I log an error message |
void |
fatal(string message, [any extraInfo=''])
I log a fatal message |
any |
getAppender(string name)
Get a named appender from this logger class |
struct |
getAppenders()
Get all the registered appenders for this logger |
string |
getCategory()
Get the configured category for this logger |
Logger |
getRootLogger()
Get the root logger |
numeric |
getlevelMax()
Get the level Max setting |
numeric |
getlevelMin()
Get the level min setting |
boolean |
hasAppenders()
Checks to see if we have registered any appenders yet |
void |
info(string message, [any extraInfo=''])
I log an information message |
void |
logMessage(string message, numeric severity, [any extraInfo=''])
Write an entry into the loggers registered with this LogBox instance |
void |
removeAllAppenders()
Removes all appenders registered |
boolean |
removeAppender(string name)
Unregister an appender from this Logger |
void |
setCategory(string category)
Set the category for this logger |
void |
setLevelMax(numeric levelMax)
Set the appender's default levelMax |
void |
setLevelMin(numeric levelMin)
Set the appender's default levelMin |
void |
setRootLogger(Logger RootLogger)
Set the root logger for this named logger |
void |
warn(string message, [any extraInfo=''])
I log a warning message |
| Methods inherited from class WEB-INF.cftags.component |
|---|
|
| Constructor Detail |
|---|
public init(string category, [numeric levelMin='0'], [numeric levelMax='4'], [struct appenders='[runtime expression]'])
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 map of already created appenders for this category, or blank to use the root logger.| Method Detail |
|---|
private any $throw(string message, [string detail=''], [string type='Framework'])
messagedetailtypepublic void addAppender(AbstractAppender newAppender='')
newAppender - The new appender to add to this logger programmatically.public boolean appenderExists(string name)
name - The name of the appender to check if it is registeredpublic boolean canLog(numeric level)
level - The level to check if it can be logged in this Loggerpublic void debug(string message, [any extraInfo=''])
message - The message to log.extraInfo - Extra information to send to the loggers.public void error(string message, [any extraInfo=''])
message - The message to log.extraInfo - Extra information to send to the loggers.public void fatal(string message, [any extraInfo=''])
message - The message to log.extraInfo - Extra information to send to the loggers.public any getAppender(string name)
name - The appender's namepublic struct getAppenders()
public string getCategory()
public Logger getRootLogger()
public numeric getlevelMax()
public numeric getlevelMin()
public boolean hasAppenders()
public void info(string message, [any extraInfo=''])
message - The message to log.extraInfo - Extra information to send to the loggers.public void logMessage(string message, numeric severity, [any extraInfo=''])
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.public void removeAllAppenders()
public boolean removeAppender(string name)
name - The name of the appender to unregisterpublic void setCategory(string category)
categorypublic void setLevelMax(numeric levelMax)
levelMaxpublic void setLevelMin(numeric levelMin)
levelMinpublic void setRootLogger(Logger RootLogger)
RootLoggerpublic void warn(string message, [any extraInfo=''])
message - The message to log.extraInfo - Extra information to send to the loggers.
|
ColdBox Platform Version 2.6.4 | ||||
| FRAMES | |||||