coldbox.system.logging.appenders

Class DBAppender

railo-context.Component
        extended by coldbox.system.logging.AbstractAppender
            extended by coldbox.system.logging.appenders.DBAppender
Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  

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

    Constructor Summary
    init(any name, [any properties='[runtime expression]'], [any layout=''], [any levelMin='0'], [any levelMax='4'])
          Constructor.
    Method Summary
    private void checkColumnMap()
         Check a column map definition.
    any doRotation()
         Do Rotation.
    private void ensureTable()
         Verify or create the logging table.
    private any getDateTimeColumnType()
    private any getDateTimeDBType()
    private any getTable()
         Return the table name with the schema included if found.
    void logMessage(any logEvent)
         Write an entry into the appender.
    void onRegistration()
         Runs on registration.
    any rotationCheck()
         Rotation checks.
     
    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

    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

    checkColumnMap

    private void checkColumnMap()

    Check a column map definition


    doRotation

    public any doRotation()

    Do Rotation


    ensureTable

    private void ensureTable()

    Verify or create the logging table


    getDateTimeColumnType

    private any getDateTimeColumnType()


    getDateTimeDBType

    private any getDateTimeDBType()


    getTable

    private any getTable()

    Return the table name with the schema included if found.


    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

    rotationCheck

    public any rotationCheck()

    Rotation checks