ColdBox Platform Version 2.6.3

coldbox.system.plugins
Class logger

WEB-INF.cftags.component
        extended by coldbox.system.frameworkSupertype
            extended by coldbox.system.plugin
                extended by coldbox.system.plugins.logger

public class logger
extends plugin

This is the frameworks logger object. It is used for all logging facilities.


Constructor Summary
init(any controller)
          Constructor
 
Method Summary
private void checkRotation()
          Checks the log file size. If greater than framework's settings, then zip and rotate.
private void createDefaultLogDirectory()
          Creates the default log directory.
 void debug(string Message, [string ExtraInfo=''])
          I log a debug message.
private void emailBugReport(string bugReport)
          Email a bug report
 void ensureLogLocations()
          Ensure log locations are set in instance correctly
 void error(string Message, [string ExtraInfo=''])
          I log an error message.
 void fatal(string Message, [string ExtraInfo=''])
          I log a fatal message.
private string formatLogEntry(string Severity, string Message, [string ExtraInfo=''])
          Format a log request into the specified entry format.
 string getLogFileName()
          Get the logfilename
 string getlogFullPath()
          Get the logFullPath
 numeric getlogLevel()
          Get the current set logLevel (between 0-4)
 struct getlogLevels()
          Get the logLevels structure
 string getvalidSeverities()
          Get the validSeverities
 void info(string Message, [string ExtraInfo=''])
          I log an information message.
 void initLogLocation()
          Initialize the ColdBox log location.
 boolean isLoggerInitialized()
          Checks if the logger's internal variables are initialized.
 void logEntry(string Severity, string Message, [string ExtraInfo=''])
          Log a message to the Coldfusion/Coldbox Logging Facilities if enabled via the config
 void logError(string Message, [any ExceptionStruct='[runtime expression]'], [any ExtraInfo=''])
          Log an error into the framework using arguments. Facade to logErrorWithBean.
 void logErrorWithBean(any ExceptionBean)
          Log an error into the framework using a coldbox exceptionBean
 void removeLogFile([boolean reinitializeFlag='true'])
          Removes the log file
 void setLogFileName(string filename)
          Set the logfilename
 void setisLoggerInitialized(boolean isLoggerInitialized)
          Set's the logger's internal variables flag to initalized.
 void setlogFullPath(string logFullPath)
          Set the logFullPath
 void setlogLevel(numeric logLevel)
          Set the logger's logLevel (0-4), else it ignores setting.
private void setupLogLocationVariables()
          Setup the log location variables.
 void tracer(string message, [any ExtraInfo=''])
          Log a trace message to the debugger panel
 void warn(string Message, [string ExtraInfo=''])
          I log a warning message.
 
Methods inherited from class coldbox.system.plugin
getPluginDescription, getPluginName, getPluginVersion, getpluginPath, setPluginDescription, setPluginName, setPluginVersion
 
Methods inherited from class coldbox.system.frameworkSupertype
abort, announceInterception, dump, getColdboxOCM, getDatasource, getDebugMode, getHash, getInstance, getInterceptor, getMailSettings, getModel, getMyPlugin, getPlugin, getResource, getSetting, getSettingStructure, getSettingsBean, getcontroller, getfwLocale, htmlhead, include, includeUDF, locateDirectoryPath, locateFilePath, persistVariables, populateModel, relocate, renderExternalView, renderView, rethrowit, runEvent, setDebugMode, setNextEvent, setNextRoute, setSetting, setcontroller, settingExists, throw
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any controller)

Method Detail

checkRotation

private void checkRotation()
Checks the log file size. If greater than framework's settings, then zip and rotate.


createDefaultLogDirectory

private void createDefaultLogDirectory()
Creates the default log directory.


debug

public void debug(string Message, [string ExtraInfo=''])
I log a debug message.

Parameters:
Message - The message to log.
ExtraInfo - Extra information to append.

emailBugReport

private void emailBugReport(string bugReport)
Email a bug report

Parameters:
bugReport - The bug report

ensureLogLocations

public void ensureLogLocations()
Ensure log locations are set in instance correctly


error

public void error(string Message, [string ExtraInfo=''])
I log an error message.

Parameters:
Message - The message to log.
ExtraInfo - Extra information to append.

fatal

public void fatal(string Message, [string ExtraInfo=''])
I log a fatal message.

Parameters:
Message - The message to log.
ExtraInfo - Extra information to append.

formatLogEntry

private string formatLogEntry(string Severity, string Message, [string ExtraInfo=''])
Format a log request into the specified entry format.

Parameters:
Severity - error|warning|info
Message - The message to log.
ExtraInfo - Extra information to append.

getLogFileName

public string getLogFileName()
Get the logfilename


getlogFullPath

public string getlogFullPath()
Get the logFullPath


getlogLevel

public numeric getlogLevel()
Get the current set logLevel (between 0-4)


getlogLevels

public struct getlogLevels()
Get the logLevels structure


getvalidSeverities

public string getvalidSeverities()
Get the validSeverities


info

public void info(string Message, [string ExtraInfo=''])
I log an information message.

Parameters:
Message - The message to log.
ExtraInfo - Extra information to append.

initLogLocation

public void initLogLocation()
Initialize the ColdBox log location.


isLoggerInitialized

public boolean isLoggerInitialized()
Checks if the logger's internal variables are initialized.


logEntry

public void logEntry(string Severity, string Message, [string ExtraInfo=''])
Log a message to the Coldfusion/Coldbox Logging Facilities if enabled via the config

Parameters:
Severity - information,debug,warning,error,fatal
Message - The message to log.
ExtraInfo - Extra information to append.

logError

public void logError(string Message, [any ExceptionStruct='[runtime expression]'], [any ExtraInfo=''])
Log an error into the framework using arguments. Facade to logErrorWithBean.

Parameters:
Message
ExceptionStruct - The CF cfcatch structure.
ExtraInfo

logErrorWithBean

public void logErrorWithBean(any ExceptionBean)
Log an error into the framework using a coldbox exceptionBean

Parameters:
ExceptionBean - This is the exception bean

removeLogFile

public void removeLogFile([boolean reinitializeFlag='true'])
Removes the log file

Parameters:
reinitializeFlag - Flag to reinitialize the log location or not.

setLogFileName

public void setLogFileName(string filename)
Set the logfilename

Parameters:
filename - The filename to set

setisLoggerInitialized

public void setisLoggerInitialized(boolean isLoggerInitialized)
Set's the logger's internal variables flag to initalized.

Parameters:
isLoggerInitialized

setlogFullPath

public void setlogFullPath(string logFullPath)
Set the logFullPath

Parameters:
logFullPath - The logFullPath to set

setlogLevel

public void setlogLevel(numeric logLevel)
Set the logger's logLevel (0-4), else it ignores setting.

Parameters:
logLevel

setupLogLocationVariables

private void setupLogLocationVariables()
Setup the log location variables.


tracer

Public void tracer(string message, [any ExtraInfo=''])
Log a trace message to the debugger panel

Parameters:
message - Message to Send
ExtraInfo - Extra Information to dump on the trace

warn

public void warn(string Message, [string ExtraInfo=''])
I log a warning message.

Parameters:
Message - The message to log.
ExtraInfo - Extra information to append.

ColdBox Platform Version 2.6.3