Trace Levels


At the heart of most logging packages is the notion of different levels of messages. By sorting your application's messages into these different levels, you can provide different levels of detail. Depending on the specific logging toolkit in use, you might route certain messages to System.out or to a file on disk and simply ignore others.

Logging defines several different logging levels, as shown in Table 9-1, in order of severity.

Table 9-1. Logging Levels

Logging Level

Meaning

Corresponding Level JDK 1.4 Level

fatal

Severe errors that cause premature termination. Expect these to be immediately visible on a status console.

SEVERE

error

Other runtime errors or unexpected conditions. Expect these to be immediately visible on a status console.

SEVERE

warn

Use of deprecated APIs, poor use of an API, and other runtime situations that are undesirable or unexpected but that don't necessarily represent an application failure. Expect these to be immediately visible on a status console.

WARNING

info

Interesting runtime events (startup/shutdown). Expect these to be immediately visible on a console, so be conservative and keep them to a minimum.

INFO

debug

Detailed information on the flow of the system. Expect these to be written to logs only.

FINE

trace

Even more detailed information than a debug trace. Expect these to be written to logs only.

FINEST




    Apache Jakarta Commons(c) Reusable Java Components
    Real World Web Services
    ISBN: N/A
    EAN: 2147483647
    Year: 2006
    Pages: 137
    Authors: Will Iverson

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net