|
Log4j 1.1b7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.Priority
Defines the minimum set of priorities recognized by the system,
that is FATAL
, ERROR
, WARN
, INFO
and DEBUG
.
The Priority
class may be subclassed to define a larger
priority set.
Field Summary | |
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 priority designates error events that
might still allow the application to continue running. |
static int |
ERROR_INT
|
static Priority |
FATAL
The FATAL priority designates very severe error
events that will presumably lead the application to abort. |
static int |
FATAL_INT
|
static Priority |
INFO
The INFO priority designates informational messages
that highlight the progress of the application at coarse-grained
level. |
static int |
INFO_INT
|
static Priority |
WARN
The WARN priority designates potentially harmful situations. |
static int |
WARN_INT
|
Constructor Summary | |
protected |
Priority(int level,
String levelStr,
int syslogEquivalent)
Instantiate a priority object. |
Method Summary | |
static Priority[] |
getAllPossiblePriorities()
Return all possible priorities as an array of Priority objects in descending order. |
int |
getSyslogEquivalent()
Return the syslog equivalent of this priority as an integer. |
boolean |
isGreaterOrEqual(Priority r)
Returns true if this priority has a higher or equal
priority than the priority passed as argument, false
otherwise.
|
int |
toInt()
Returns the integer representation of this priority. |
static Priority |
toPriority(int val)
Convert an integer passed as argument to a priority. |
static Priority |
toPriority(int val,
Priority defaultPriority)
Convert an integer passed as argument to a priority. |
static Priority |
toPriority(String sArg)
Convert the string passed as argument to a priority. |
static Priority |
toPriority(String sArg,
Priority defaultPriority)
Convert the string passed as argument to a priority. |
String |
toString()
Returns the string representation of this priority. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FATAL_INT
public static final int ERROR_INT
public static final int WARN_INT
public static final int INFO_INT
public static final int DEBUG_INT
public static final Priority FATAL
FATAL
priority designates very severe error
events that will presumably lead the application to abort.public static final Priority ERROR
ERROR
priority designates error events that
might still allow the application to continue running.public static final Priority WARN
WARN
priority designates potentially harmful situations.public static final Priority INFO
INFO
priority designates informational messages
that highlight the progress of the application at coarse-grained
level.public static final Priority DEBUG
DEBUG
priority designates fine-grained
informational events that are most useful to debug an
application.Constructor Detail |
protected Priority(int level, String levelStr, int syslogEquivalent)
Method Detail |
public final int getSyslogEquivalent()
public final String toString()
toString
in class Object
public final int toInt()
public boolean isGreaterOrEqual(Priority r)
true
if this priority has a higher or equal
priority than the priority passed as argument, false
otherwise.
You should think twice before overriding the default
implementation of isGreaterOrEqual
method.
public static Priority[] getAllPossiblePriorities()
public static Priority toPriority(String sArg)
DEBUG
.public static Priority toPriority(int val)
DEBUG
.public static Priority toPriority(int val, Priority defaultPriority)
public static Priority toPriority(String sArg, Priority defaultPriority)
defaultPriority
.
|
Log4j 1.1b7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |