ColdBox Platform Version 2.6.4

coldbox.system.logging.appenders
Class DBAppender

WEB-INF.cftags.component
        extended by coldbox.system.logging.AbstractAppender
            extended by coldbox.system.logging.appenders.DBAppender

public class DBAppender
extends AbstractAppender

This is a simple implementation of a appender that is db based.


Constructor Summary
init(string name, [struct properties='[runtime expression]'], [string layout=''], [numeric levelMin='0'], [numeric levelMax='4'])
          Constructor
 
Method Summary
private void checkColumnMap()
          Check a column map definition
private void ensureDSN()
          Verify the datasource
private void ensureTable()
          Verify or create the logging table
 void logMessage(LogEvent logEvent)
          Write an entry into the appender
 void onRegistration()
          Runs on registration
 
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(string name, [struct properties='[runtime expression]'], [string layout=''], [numeric levelMin='0'], [numeric 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

checkColumnMap

private void checkColumnMap()
Check a column map definition


ensureDSN

private void ensureDSN()
Verify the datasource


ensureTable

private void ensureTable()
Verify or create the logging table


logMessage

public void logMessage(LogEvent 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

ColdBox Platform Version 2.6.4