org.apache.log4j
Class Priority
java.lang.Object
org.apache.log4j.Priority
public class Priority
extends java.lang.Object
Refrain from using this class directly, use
the Level
class instead.
- Ceki Gülcü
static int | ALL_INT
|
static Priority | DEBUG - The
DEBUG priority designates fine-grained
informational events that are most useful to debug an
application.
|
static int | DEBUG_INT
|
static Priority | ERROR - The
ERROR level designates error events that
might still allow the application to continue running.
|
static int | ERROR_INT
|
static Priority | FATAL - The
FATAL level designates very severe error
events that will presumably lead the application to abort.
|
static int | FATAL_INT
|
static Priority | INFO - The
INFO level designates informational messages
that highlight the progress of the application at coarse-grained
level.
|
static int | INFO_INT
|
static int | OFF_INT
|
static Priority | WARN - The
WARN level designates potentially harmful situations.
|
static int | WARN_INT
|
Priority(int level, String levelStr, int syslogEquivalent) - Instantiate a level object.
|
ALL_INT
public static final int ALL_INT
DEBUG
public static final Priority DEBUG
The DEBUG
priority designates fine-grained
informational events that are most useful to debug an
application.
DEBUG_INT
public static final int DEBUG_INT
- 10000
ERROR
public static final Priority ERROR
The ERROR
level designates error events that
might still allow the application to continue running.
ERROR_INT
public static final int ERROR_INT
- 40000
FATAL
public static final Priority FATAL
The FATAL
level designates very severe error
events that will presumably lead the application to abort.
FATAL_INT
public static final int FATAL_INT
- 50000
INFO
public static final Priority INFO
The INFO
level designates informational messages
that highlight the progress of the application at coarse-grained
level.
INFO_INT
public static final int INFO_INT
- 20000
OFF_INT
public static final int OFF_INT
WARN
public static final Priority WARN
The WARN
level designates potentially harmful situations.
WARN_INT
public static final int WARN_INT
- 30000
Priority
protected Priority(int level,
String levelStr,
int syslogEquivalent)
Instantiate a level object.
equals
public boolean equals(Object o)
Two priorities are equal if their level fields are equal.
- 1.2
getAllPossiblePriorities
public static Priority[] getAllPossiblePriorities()
This method will be removed with no replacement.
Return all possible priorities as an array of Level objects in
descending order.
getSyslogEquivalent
public final int getSyslogEquivalent()
Return the syslog equivalent of this priority as an integer.
isGreaterOrEqual
public boolean isGreaterOrEqual(Priority r)
Returns
true
if this level has a higher or equal
level than the level passed as argument,
false
otherwise.
You should think twice before overriding the default
implementation of
isGreaterOrEqual
method.
toInt
public final int toInt()
Returns the integer representation of this level.
toPriority
public static Priority toPriority(String sArg)
Please use the Level.toLevel(String)
method instead.}
Convert the string passed as argument to a priority. If the
conversion fails, then this method returns
DEBUG
.
toPriority
public static Priority toPriority(String sArg,
Priority defaultPriority)
Convert the string passed as argument to a priority. If the
conversion fails, then this method returns the value of
defaultPriority
.
toPriority
public static Priority toPriority(int val)
Convert an integer passed as argument to a priority. If the
conversion fails, then this method returns
DEBUG
.
toPriority
public static Priority toPriority(int val,
Priority defaultPriority)
Convert an integer passed as argument to a priority. If the
conversion fails, then this method returns the specified default.
toString
public final String toString()
Returns the string representation of this priority.
Copyright 2000-2002 Apache Software Foundation.