ox.system.logging.concurrent.Callable interface"> Callable
ColdBox Platform - LogBox Version 1.5

logbox.system.logging
Class AbstractAppender

WEB-INF.cftags.component
        extended by logbox.system.logging.AbstractAppender
Direct Known Subclasses:
CFAppender , ColdboxTracerAppender , ConsoleAppender , DBAppender , DummyAppender , EmailAppender , FileAppender , ScopeAppender , SocketAppender , TracerAppender , TwitterAppender

public class AbstractAppender
extends WEB-INF.cftags.component

This is the abstract interface component for all LogBox Appenders


Constructor Summary
init(string name, [struct properties='[runtime expression]'], [string layout=''], [numeric levelMin='0'], [numeric levelMax='4'])
          Constructor called by a Concrete Appender
 
Method Summary
private void $abort()
          Facade for cfabort
private void $dump(any var, [boolean isAbort='false'])
          Facade for cfmx dump
private void $log(string severity='INFO', string message='')
          Log an internal message to the ColdFusion facilities
private void $rethrowit(any throwObject)
          Rethrow facade
private any $throw(string message, [string detail=''], [string type='Framework'])
          Facade for cfthrow
 boolean canLog(numeric level)
          Checks wether a log can be made on this appender using a passed in level
 any getColdbox()
          Get the ColdBox application controller LogBox is linked to
 any getCustomLayout()
          Get the custom layout object
 string getHash()
          Get this appender's unique ID
 string getName()
          Get this appender's name
 struct getProperties()
          Get properties structure map
 any getProperty(string property)
          Get a property, throws exception if not found
private Util getUtil()
          Create and return a util object
 numeric getlevelMax()
          Get the level Max setting
 numeric getlevelMin()
          Get the level min setting
 Boolean hasCustomLayout()
          Whether a custom layout has been set or not
 boolean isInitialized()
          Checks if the appender's internal variables are initialized
 void logMessage(LogEvent logEvent)
          Write an entry into the appender
 void onRegistration()
          Runs after the appender has been created and registered
 void onUnRegistration()
          Runs before the appender is unregistered from LogBox
 boolean propertyExists(string property)
          Checks wether a given property exists or not
 void setColdbox(any coldbox)
          Set the ColdBox application link
 void setInitialized(boolean initialized)
          Set's the appender's internal variables flag to initalized
 void setLevelMax(numeric levelMax)
          Set the appender's default levelMax
 void setLevelMin(numeric levelMin)
          Set the appender's default levelMin
 void setProperties(struct properties)
          Set the entire properties structure map
 void setProperty(string property, any value)
          Set a property
 string severityToString(numeric severity)
          convert a severity to a string
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(string name, [struct properties='[runtime expression]'], [string layout=''], [numeric levelMin='0'], [numeric levelMax='4'])
Constructor called by a Concrete Appender

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

$abort

private void $abort()
Facade for cfabort


$dump

private void $dump(any var, [boolean isAbort='false'])
Facade for cfmx dump

Parameters:
var
isAbort - Abort also

$log

private void $log(string severity='INFO', string message='')
Log an internal message to the ColdFusion facilities. Used when errors ocurrs or diagnostics

Parameters:
severity - The severity to use.
message - The message to log

$rethrowit

private void $rethrowit(any throwObject)
Rethrow facade

Parameters:
throwObject - The cfcatch object

$throw

private any $throw(string message, [string detail=''], [string type='Framework'])
Facade for cfthrow

Parameters:
message
detail
type

canLog

public boolean canLog(numeric level)
Checks wether a log can be made on this appender using a passed in level

Parameters:
level - The level to check if it can be logged in this Appender

getColdbox

public any getColdbox()
Get the ColdBox application controller LogBox is linked to. If not set, it will return an empty string.


getCustomLayout

public any getCustomLayout()
Get the custom layout object


getHash

public string getHash()
Get this appender's unique ID


getName

public string getName()
Get this appender's name


getProperties

public struct getProperties()
Get properties structure map


getProperty

public any getProperty(string property)
Get a property, throws exception if not found.

Parameters:
property - The key of the property to return.

getUtil

private Util getUtil()
Create and return a util object


getlevelMax

public numeric getlevelMax()
Get the level Max setting


getlevelMin

public numeric getlevelMin()
Get the level min setting


hasCustomLayout

public Boolean hasCustomLayout()
Whether a custom layout has been set or not.


isInitialized

public boolean isInitialized()
Checks if the appender's internal variables are initialized.


logMessage

public void logMessage(LogEvent logEvent)
Write an entry into the appender. You must implement this method yourself.

Parameters:
logEvent - The logging event to log.

onRegistration

public void onRegistration()
Runs after the appender has been created and registered. Implemented by Concrete appender


onUnRegistration

public void onUnRegistration()
Runs before the appender is unregistered from LogBox. Implemented by Concrete appender


propertyExists

public boolean propertyExists(string property)
Checks wether a given property exists or not.

Parameters:
property - The property name

setColdbox

public void setColdbox(any coldbox)
Set the ColdBox application link

Parameters:
coldbox

setInitialized

public void setInitialized(boolean initialized)
Set's the appender's internal variables flag to initalized.

Parameters:
initialized

setLevelMax

public void setLevelMax(numeric levelMax)
Set the appender's default levelMax

Parameters:
levelMax

setLevelMin

public void setLevelMin(numeric levelMin)
Set the appender's default levelMin

Parameters:
levelMin

setProperties

public void setProperties(struct properties)
Set the entire properties structure map

Parameters:
properties

setProperty

public void setProperty(string property, any value)
Set a property

Parameters:
property - The property name to set.
value - The value of the property.

severityToString

public string severityToString(numeric severity)
convert a severity to a string

Parameters:
severity - The severity to convert

ColdBox Platform - LogBox Version 1.5