ColdBox Platform Version 3.7.0

coldbox.system.logging.appenders
Class FileAppender

WEB-INF.cftags.component
        extended by coldbox.system.logging.AbstractAppender
            extended by coldbox.system.logging.appenders.FileAppender
Direct Known Subclasses:
AsyncFileAppender , RollingFileAppender

public class FileAppender
extends AbstractAppender

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 getlockTimeout()
          The lock timeout
 any getlockname()
          The file Lock name
 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
$abort, $dump, $log, $rethrowit, $throw, canLog, getColdbox, getCustomLayout, getHash, getName, getProperties, getProperty, getUtil, getlevelMax, getlevelMin, hasCustomLayout, isInitialized, onUnRegistration, propertyExists, setColdbox, setInitialized, setLevelMax, setLevelMin, setProperties, setProperty, severityToString
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any name, [any properties='[runtime expression]'], [any layout=''], [any levelMin='0'], [any levelMax='4'])
Constructor

Parameters:
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.WARN
levelMax - The default log level for this appender, by default it is 5. Optional. ex: LogBox.logLevels.WARN
Method Detail

append

private void append(any message)
Append a message to a file

Parameters:
message - The message to append

ensureDefaultLogDirectory

private void ensureDefaultLogDirectory()
Ensures the log directory.


getlockTimeout

public any getlockTimeout()
The lock timeout


getlockname

public any getlockname()
The file Lock name


getlogFullpath

public any getlogFullpath()
Get the full log path used.


initLogLocation

public void initLogLocation()
Initialize the file log location if it does not exist.


logMessage

public void logMessage(any logEvent)
Write an entry into the appender.

Overrides:
logMessage in class AbstractAppender
Parameters:
logEvent - The logging event

onRegistration

public void onRegistration()
Runs on registration

Overrides:
onRegistration in class AbstractAppender

removeLogFile

public void removeLogFile()
Removes the log file


ColdBox Platform Version 3.7.0