logbox.system.logging.appenders

Class ScopeAppender

lucee.Component
    extended by logbox.system.logging.AbstractAppender
      extended by logbox.system.logging.appenders.ScopeAppender

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- A simple Scope Appender that logs to a specified scope. Properties: - scope : the scope to persist to, defaults to request (optional) - key : the key to use in the scope, it defaults to the name of the Appender (optional) - limit : a limit to the amount of logs to rotate. Defaults to 0, unlimited (optional)

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Constructor Summary
    init(any name, [struct properties='[runtime expression]'], [any layout=''], [any levelMin='0'], [any levelMax='4'])
          Constructor.
    Method Summary
    private any ensureStorage()
         Ensure the first storage in the scope.
    private any getStorage()
         Get the storage.
    any logMessage(LogEvent logEvent)
         Write an entry into the appender.
    private any saveStorage(any data)
         Save Storage.
     
    Methods inherited from class logbox.system.logging.AbstractAppender
    $log, canLog, getColdbox, getCustomLayout, getHash, getInitialized, getLevelMax, getLevelMin, getName, getProperties, getProperty, getUtil, hasCustomLayout, isInitialized, onRegistration, onUnRegistration, out, propertyExists, setColdbox, setCustomLayout, setInitialized, setLevelMax, setLevelMin, setName, setProperties, setProperty, severityToString
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any name, [struct 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

    ensureStorage

    private any ensureStorage()

    Ensure the first storage in the scope


    getStorage

    private any getStorage()

    Get the storage


    logMessage

    public any logMessage(LogEvent logEvent)

    Write an entry into the appender. You must implement this method yourself.

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

    saveStorage

    private any saveStorage(any data)

    Save Storage

    Parameters:
    data - The data to store