lucee.Component logbox.system.logging.AbstractAppender
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This component is used as a base for creating LogBox appenders
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
coldbox
ColdBox Controller Linkage, empty if in standalone mode.
|
true
|
false
|
|
any
|
customLayout
Appender customLayout for rendering messages.
|
true
|
false
|
|
boolean
|
initialized
Appender initialized flag.
|
false
|
true
|
false
|
numeric
|
levelMax
Max logging level.
|
true
|
false
|
|
numeric
|
levelMin
Min logging level.
|
true
|
false
|
|
any
|
name
Appender name.
|
true
|
false
|
|
struct
|
properties
Appender properties.
|
true
|
false
|
Constructor Summary | |
---|---|
init(any name, [struct properties='[runtime expression]'], [any layout=''], [any levelMin='0'], [any levelMax='4'])
Constructor. |
Method Summary | |
---|---|
private AbstractAppender
|
$log(any severity, any message)
Facade to internal ColdFusion logging facilities, just in case. |
boolean
|
canLog(numeric level)
Checks wether a log can be made on this appender using a passed in level. |
string
|
getColdbox()
|
string
|
getCustomLayout()
|
any
|
getHash()
Get internal hash id. |
string
|
getInitialized()
|
string
|
getLevelMax()
|
string
|
getLevelMin()
|
string
|
getName()
|
string
|
getProperties()
|
any
|
getProperty(any property)
Get a property from the `properties` struct. |
private any
|
getUtil()
Get the ColdBox Utility object. |
boolean
|
hasCustomLayout()
Verify if we have a custom layout object linked. |
boolean
|
isInitialized()
Is appender initialized. |
AbstractAppender
|
logMessage(LogEvent logEvent)
Write an entry into the appender. |
AbstractAppender
|
onRegistration()
Runs after the appender has been created and registered. |
AbstractAppender
|
onUnRegistration()
Runs before the appender is unregistered from LogBox. |
private any
|
out(any message, [boolean addNewLine='true'])
Utiliy to send to output to console. |
boolean
|
propertyExists(any property)
Validate a property from the `properties` struct. |
any
|
setColdbox(any coldbox)
|
any
|
setCustomLayout(any customLayout)
|
any
|
setInitialized(boolean initialized)
|
AbstractAppender
|
setLevelMax(any levelMax)
Setter for level max. |
AbstractAppender
|
setLevelMin(any levelMin)
Setter for level min. |
any
|
setName(any name)
|
any
|
setProperties(struct properties)
|
AbstractAppender
|
setProperty(any property, any value)
Set a property from the `properties` struct. |
any
|
severityToString(numeric severity)
convert a severity to a string. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
name
- The unique name for this appender.properties
- A map of configuration properties for the appender"layout
- The layout class to use in this appender for custom message rendering.levelMin
- 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.WARNProperty Detail |
---|
ColdBox Controller Linkage, empty if in standalone mode.
access
- publicrequired
- falsereturntype
- anyserializable
- trueAppender customLayout for rendering messages
access
- publicrequired
- falsereturntype
- anyserializable
- trueAppender initialized flag
access
- publicrequired
- falsereturntype
- anyserializable
- trueMax logging level
access
- publicrequired
- falsereturntype
- anyserializable
- trueMin logging level
access
- publicrequired
- falsereturntype
- anyserializable
- trueAppender name
access
- publicrequired
- falsereturntype
- anyserializable
- trueAppender properties
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Facade to internal ColdFusion logging facilities, just in case.
severity
message
Checks wether a log can be made on this appender using a passed in level
level
- The level to checkGet internal hash id
Get a property from the `properties` struct
property
- The property keyGet the ColdBox Utility object
Verify if we have a custom layout object linked
Is appender initialized
Write an entry into the appender. You must implement this method yourself.
logEvent
- The logging event to logRuns after the appender has been created and registered. Implemented by Concrete appender
Runs before the appender is unregistered from LogBox. Implemented by Concrete appender
Utiliy to send to output to console.
message
- Message to sendaddNewLine
- Add a line break or not, default is yesValidate a property from the `properties` struct
property
- The property keycoldbox
customLayout
initialized
Setter for level max
levelMax
Setter for level min
levelMin
name
properties
Set a property from the `properties` struct
property
- The property keyvalue
- The value of the propertyconvert a severity to a string
severity
- The severity to convert to a string