lucee.Component coldbox.system.logging.AbstractAppender coldbox.system.logging.appenders.DBAppender
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- A simple DB appender for MySQL, MSSQL, Oracle, PostgreSQL Properties: - dsn : the dsn to use for logging - table : the table to store the logs in - schema : which schema the table exists in (Optional) - columnMap : A column map for aliasing columns. (Optional) - autocreate : if true, then we will create the table. Defaults to false (Optional) - ensureChecks : if true, then we will check the dsn and table existence. Defaults to true (Optional) The columns needed in the table are - id : UUID - severity : string - category : string - logdate : timestamp - appendername : string - message : string - extrainfo : string If you are building a mapper, the map must have the above keys in it.
Constructor Summary | |
---|---|
init(any name, [struct properties='[runtime expression]'], [any layout=''], [any levelMin='0'], [any levelMax='4'])
Constructor. |
Method Summary | |
---|---|
private any
|
checkColumnMap()
Check a column map definition. |
any
|
doRotation()
Do the rotation. |
private any
|
ensureTable()
Verify or create the logging table. |
private any
|
getDateTimeColumnType()
Get db specific text column type. |
private any
|
getDateTimeDBType()
Get db specific date time column type. |
private any
|
getTable()
Return the table name with the schema included if found. |
private any
|
getTextColumnType()
Get db specific text column type. |
any
|
logMessage(LogEvent logEvent)
Write an entry into the appender. |
any
|
onRegistration()
Runs on registration. |
any
|
rotationCheck()
Rotation checks. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
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.WARNlevelMax
- The default log level for this appender, by default it is 5. Optional. ex: LogBox.logLevels.WARNMethod Detail |
---|
Check a column map definition
Do the rotation
Verify or create the logging table
Get db specific text column type
Get db specific date time column type
Return the table name with the schema included if found.
Get db specific text column type
Write an entry into the appender. You must implement this method yourself.
logMessage
in class
AbstractAppender
logEvent
- The logging event to logRuns on registration
onRegistration
in class
AbstractAppender
Rotation checks