OLF: Logging Levels
Logging levels are available in many logging tools. Log4j, log4perl and log4plsql all have logging levels. The Oracle Logging Facility (OLF) follows the basic Log4j logging levels and values:
- FATAL – 50000
- ERROR – 40000
- WARN – 30000
- INFO – 20000
- DEBUG – 10000
Log4j also includes an ALL and an OFF level, and the Oracle Logging Framework (OLF) includes these levels as well as a TIMED level that is used to insure that task timing is always logged. Each level is set so that ALL < DEBUG < INFO < WARN < ERROR < FATAL < TIMED < OFF. A default level of INFO is assigned in the OLF code and can be overridden in the dynamic configuration or it can be explicitly set.
The log levels are hierarchical and a call to a level will only log messages that are of a level that is greater than or equal to the current level setting. In other words, if the current log level for the task has been set to INFO, then all dblog calls with a level of INFO or greater will be logged. DEBUG messages will not be logged. The level TIMED is not directly usable as it is set by the task time routine, and the ALL or OFF levels can only be set as the current configuration level.
Only the DEBUG, INFO, WARN, ERROR, FATAL levels can be used at the program level since there are no dblog.timed, dblog.all or dblog.off procedure calls.
The following table shows the output message hierarchy:
| Will Output Messages | |||||
| dblog level | DEBUG | INFO | WARN | ERROR | FATAL |
| DEBUG | Yes | Yes | Yes | Yes | Yes |
| INFO | No | Yes | Yes | Yes | Yes |
| WARN | No | No | Yes | Yes | Yes |
| ERROR | No | No | No | Yes | Yes |
| FATAL | No | No | No | No | Yes |
| TIMED | Yes | Yes | Yes | Yes | Yes |
| ALL | Yes | Yes | Yes | Yes | Yes |
| OFF | No | No | No | No | No |
The next topic will be about appenders.
Entries