|
Log4j 0.9.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.log4j.Priority
The Priority class defines the priorities that log4j recognizes.
At this time the possible priorities are EMERG, ALERT, CRIT, ERROR, WARN, NOTICE, INFO and DEBUG which correspond to the Unix Syslog priorities.
It is suggested that you only use the ERROR, WARN, INFO and DEBUG priorities.
Field Summary | |
static Priority |
ALERT
|
static Priority |
CRIT
|
static Priority |
DEBUG
|
static Priority |
EMERG
|
static Priority |
ERROR
|
static Priority |
INFO
|
static Priority |
NOTICE
|
protected String |
strValue
|
protected int |
value
|
static Priority |
WARN
|
Constructor Summary | |
protected |
Priority(int value)
Constructor for the Priority class. |
Method Summary | |
static Priority[] |
getAllPossiblePriorities()
Return all possible priorities as an array of Priority objects in descending order. |
boolean |
isAsSevereAs(Priority r)
|
int |
toInt()
|
static Priority |
toPriority(int i)
Converts an integer into a Priority. |
static Priority |
toPriority(String sArg)
Converts a String into a Priority. |
static Priority |
toPriority(String sArg,
Priority deefault)
Converts a String into a Priority. |
String |
toString()
Return the string corresponding to the priority. |
int |
toSyslogInt()
Return the equivalent syslog priority integer for this Priority instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Priority EMERG
public static final Priority ALERT
public static final Priority CRIT
public static final Priority ERROR
public static final Priority WARN
public static final Priority NOTICE
public static final Priority INFO
public static final Priority DEBUG
protected int value
protected String strValue
Constructor Detail |
protected Priority(int value)
Constructor for the Priority class.
value
- Should be one of the priority constants.Method Detail |
public static Priority[] getAllPossiblePriorities()
public final boolean isAsSevereAs(Priority r)
public final int toInt()
public static Priority toPriority(String sArg)
If the argument is not one of "DEBUG", "INFO", ..., "EMERG"
then the the default value Priority.DEBUG
is
returned.
public static Priority toPriority(String sArg, Priority deefault)
It the sArg
parameter cannot be converted to a
priority, then the deefault
parameter (specified by
the caller) is returned.
public static Priority toPriority(int i) throws IllegalArgumentException
public final String toString()
toString
in class Object
public int toSyslogInt() throws IllegalStateException
Sub-classes of priority must override this method to
return their own syslog equivalent, otherwise an IllegalStateException
may be thrown.
|
Log4j 0.9.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |