Content deleted Content added
mNo edit summary |
m →Logger |
||
Line 3:
==Functionality Overview==
===Logger===
Most frameworks support a the notion of a Logger. A Logger is an object that allows the application to log data without regard to where the data is actually logged. The application logs a message in the form of an object or and object and and exception. The message is logged at a certain level. The common levels are, copied from [http://jakarta.apache.org/commons/logging/guide.html#Message_Priorities_Levels Jakarta Commons Logging]:
{| border=1 cellspacing=0 cellpadding=5
|FATAL
|Severe errors that cause premature termination. Expect these to be immediately visible on a status console.
|-
|ERROR
|Other runtime errors or unexpected conditions. Expect these to be immediately visible on a status console.
|-
|WARNING
|Use of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong". Expect these to be immediately visible on a status console.
|-
|INFO
|Interesting runtime events (startup/shutdown). Expect these to be immediately visible on a console, so be conservative and keep to a minimum.
|-
|DEBUG
|detailed information on the flow through the system. Expect these to be written to logs only.
|-
|TRACE
|more detailed information. Expect these to be written to logs only.
|}
The logging framework maintains the current logging level for each logger. The logging level can be set more or less restrictive. For example, if the logging level is set to "WARNING", then all messages of that level or higher are logged, ERROR and FATAL.
==Best Practices==
==Summary==
|