railo-context.Component coldbox.system.logging.AbstractAppender coldbox.system.logging.appenders.FileAppender
This is a simple implementation of an appender that is file based.
Constructor Summary | |
---|---|
init(any name, [any properties='[runtime expression]'], [any layout=''], [any levelMin='0'], [any levelMax='4'])
Constructor. |
Method Summary | |
---|---|
private void
|
append(any message)
Append a message to a file. |
private void
|
ensureDefaultLogDirectory()
Ensures the log directory. |
any
|
getlockname()
The file Lock name. |
any
|
getlockTimeout()
The lock timeout. |
any
|
getlogFullpath()
Get the full log path used. |
void
|
initLogLocation()
Initialize the file log location if it does not exist. |
void
|
logMessage(any logEvent)
Write an entry into the appender. |
void
|
onRegistration()
Runs on registration. |
void
|
removeLogFile()
Removes the log file. |
Methods inherited from class coldbox.system.logging.AbstractAppender |
---|
$log, canLog, getColdbox, getCustomLayout, getHash, getlevelMax, getlevelMin, getName, getProperties, getProperty, getUtil, hasCustomLayout, isInitialized, onUnRegistration, propertyExists, setColdbox, setInitialized, setLevelMax, setLevelMin, setProperties, setProperty, severityToString |
Methods inherited from class railo-context.Component |
---|
None |
Constructor Detail |
---|
Constructor
name
- The unique name for this appender.properties
- A map of configuration properties for the appenderlayout
- 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.WARNMethod Detail |
---|
Append a message to a file
message
- The message to appendEnsures the log directory.
The file Lock name
The lock timeout
Get the full log path used.
Initialize the file log location if it does not exist.
Write an entry into the appender.
logMessage
in class
AbstractAppender
logEvent
- The logging eventRuns on registration
onRegistration
in class
AbstractAppender
Removes the log file