public class

Level

extends Priority
implements Serializable
java.lang.Object
   ↳ org.apache.log4j.Priority
     ↳ org.apache.log4j.Level

Class Overview

Defines the minimum set of levels recognized by the system, that is OFF, FATAL, ERROR, WARN, INFODEBUG and ALL.

The Level class may be subclassed to define a larger level set.

Summary

Constants
int TRACE_INT TRACE level integer value.
[Expand]
Inherited Constants
From class org.apache.log4j.Priority
Fields
public static final Level ALL The ALL has the lowest possible rank and is intended to turn on all logging.
public static final Level DEBUG The DEBUG Level designates fine-grained informational events that are most useful to debug an application.
public static final Level ERROR The ERROR level designates error events that might still allow the application to continue running.
public static final Level FATAL The FATAL level designates very severe error events that will presumably lead the application to abort.
public static final Level INFO The INFO level designates informational messages that highlight the progress of the application at coarse-grained level.
public static final Level OFF The OFF has the highest possible rank and is intended to turn off logging.
public static final Level TRACE The TRACE Level designates finer-grained informational events than the DEBUG
public static final Level WARN The WARN level designates potentially harmful situations.
[Expand]
Inherited Fields
From class org.apache.log4j.Priority
Protected Constructors
Level(int level, String levelStr, int syslogEquivalent)
Instantiate a Level object.
Public Methods
static Level toLevel(String sArg, Level defaultLevel)
Convert the string passed as argument to a level.
static Level toLevel(int val)
Convert an integer passed as argument to a level.
static Level toLevel(int val, Level defaultLevel)
Convert an integer passed as argument to a level.
static Level toLevel(String sArg)
Convert the string passed as argument to a level.
[Expand]
Inherited Methods
From class org.apache.log4j.Priority
From class java.lang.Object

Constants

public static final int TRACE_INT

TRACE level integer value.

Constant Value: 5000 (0x00001388)

Fields

public static final Level ALL

The ALL has the lowest possible rank and is intended to turn on all logging.

public static final Level DEBUG

The DEBUG Level designates fine-grained informational events that are most useful to debug an application.

public static final Level ERROR

The ERROR level designates error events that might still allow the application to continue running.

public static final Level FATAL

The FATAL level designates very severe error events that will presumably lead the application to abort.

public static final Level INFO

The INFO level designates informational messages that highlight the progress of the application at coarse-grained level.

public static final Level OFF

The OFF has the highest possible rank and is intended to turn off logging.

public static final Level TRACE

The TRACE Level designates finer-grained informational events than the DEBUG

public static final Level WARN

The WARN level designates potentially harmful situations.

Protected Constructors

protected Level (int level, String levelStr, int syslogEquivalent)

Instantiate a Level object.

Public Methods

public static Level toLevel (String sArg, Level defaultLevel)

Convert the string passed as argument to a level. If the conversion fails, then this method returns the value of defaultLevel.

public static Level toLevel (int val)

Convert an integer passed as argument to a level. If the conversion fails, then this method returns DEBUG.

public static Level toLevel (int val, Level defaultLevel)

Convert an integer passed as argument to a level. If the conversion fails, then this method returns the specified default.

public static Level toLevel (String sArg)

Convert the string passed as argument to a level. If the conversion fails, then this method returns DEBUG.