|
Log4j 1.3alpha-7 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.log4j.Level
Defines the minimum set of levels recognized by the system, that is
OFF
, FATAL
, ERROR
,
WARN
, INFO
, DEBUG
,
TRACE
, and ALL
.
The Level
class may be subclassed to define a larger
level set.
Field Summary | |
static Level |
ALL
The ALL has the lowest possible rank and is intended to
turn on all logging. |
static int |
ALL_INT
ALL level integer value. |
static Level |
DEBUG
The DEBUG Level designates fine-grained
informational events that are most useful to debug an
application. |
static int |
DEBUG_INT
DEBUG level integer value. |
static Level |
ERROR
The ERROR level designates error events that
might still allow the application to continue running. |
static int |
ERROR_INT
ERROR level integer value. |
static Level |
FATAL
The FATAL level designates very severe error
events that will presumably lead the application to abort. |
static int |
FATAL_INT
FATAL level integer value. |
static Level |
INFO
The INFO level designates informational messages
that highlight the progress of the application at coarse-grained
level. |
static int |
INFO_INT
INFO level integer value. |
static Level |
OFF
The OFF has the highest possible rank and is
intended to turn off logging. |
static int |
OFF_INT
OFF level integer value. |
static Level |
TRACE
The TRACE Level designates finer-grained
informational events than the DEBUG
|
static int |
TRACE_INT
TRACE level integer value. |
static Level |
WARN
The WARN level designates potentially harmful situations. |
static int |
WARN_INT
WARN level integer value. |
Constructor Summary | |
protected |
Level(int level,
String levelStr,
int syslogEquivalent)
Instantiate a level object. |
Method Summary | |
boolean |
equals(Object o)
Two Levels (formerly Priorities) are equal if their level integer value fields are equal. |
static Level[] |
getAllPossiblePriorities()
Deprecated. This method will be removed with no replacement. |
int |
getSyslogEquivalent()
Return the syslog equivalent of this priority as an integer. |
int |
hashCode()
The hashCode of a Level (i.e. |
boolean |
isGreaterOrEqual(Level r)
Returns true if this level has a higher or equal
level than the level passed as argument, false
otherwise.
|
int |
toInt()
Returns the integer representation of this 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. |
static Level |
toLevel(String sArg,
Level defaultLevel)
Convert the string passed as argument to a level. |
String |
toString()
Returns the string representation of this Level. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int OFF_INT
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 int TRACE_INT
public static final int ALL_INT
public static final Level OFF
OFF
has the highest possible rank and is
intended to turn off logging.
public static final Level FATAL
FATAL
level designates very severe error
events that will presumably lead the application to abort.
public static final Level ERROR
ERROR
level designates error events that
might still allow the application to continue running.
public static final Level WARN
WARN
level designates potentially harmful situations.
public static final Level INFO
INFO
level designates informational messages
that highlight the progress of the application at coarse-grained
level.
public static final Level DEBUG
DEBUG
Level designates fine-grained
informational events that are most useful to debug an
application.
public static final Level TRACE
TRACE
Level designates finer-grained
informational events than the DEBUG
public static final Level ALL
ALL
has the lowest possible rank and is intended to
turn on all logging.
Constructor Detail |
protected Level(int level, String levelStr, int syslogEquivalent)
level
- The integer level valuelevelStr
- The level namesyslogEquivalent
- The UNIX SystLog level equivalentMethod Detail |
public static Level toLevel(String sArg)
DEBUG
.
sArg
- The level name
public static Level toLevel(int val)
DEBUG
.
val
- The level integer value
public boolean equals(Object o)
o
- The other Level
public int hashCode()
public final int getSyslogEquivalent()
public boolean isGreaterOrEqual(Level r)
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.
r
- other level, may not be null.
public static Level[] getAllPossiblePriorities()
public final String toString()
public final int toInt()
public static Level toLevel(int val, Level defaultLevel)
val
- The integer valuedefaultLevel
- The Level to return if no match is found
public static Level toLevel(String sArg, Level defaultLevel)
defaultLevel
.
sArg
- The Level namedefaultLevel
- Level to return if no match is found
|
Log4j 1.3alpha-7 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |