|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Level>
org.apache.logging.log4j.Level
public enum Level
Levels used for identifying the severity of an event. Levels are organized from most specific to least:
OFF (most specific)
FATAL
ERROR
WARN
INFO
DEBUG
TRACE
AL (least specific)
Typically, configuring a level in a filter or on a logger will cause logging events of that level and those
that are more specific to pass through the filter.
A special level, ALL, is guaranteed to capture all levels when used in logging configurations.
Enum Constant Summary | |
---|---|
ALL
All events should be logged. |
|
DEBUG
A general debugging event. |
|
ERROR
An error in the application, possibly recoverable. |
|
FATAL
A severe error that will prevent the application from continuing. |
|
INFO
An event for informational purposes. |
|
OFF
No events will be logged. |
|
TRACE
A fine-grained debug message, typically capturing the flow through the application. |
|
WARN
An event that might possible lead to an error. |
Method Summary | |
---|---|
int |
intLevel()
Returns the integer value of the Level. |
boolean |
isAtLeastAsSpecificAs(int level)
Compares this level against the level passed as an argument and returns true if this level is the same or more specific. |
boolean |
isAtLeastAsSpecificAs(Level level)
Compares this level against the level passed as an argument and returns true if this level is the same or more specific. |
boolean |
lessOrEqual(int level)
Compares the specified Level against this one. |
boolean |
lessOrEqual(Level level)
Compares the specified Level against this one. |
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. |
static Level |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Level[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Level OFF
public static final Level FATAL
public static final Level ERROR
public static final Level WARN
public static final Level INFO
public static final Level DEBUG
public static final Level TRACE
public static final Level ALL
Method Detail |
---|
public static Level[] values()
for (Level c : Level.values()) System.out.println(c);
public static Level valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static Level toLevel(String sArg)
DEBUG
.
sArg
- The name of the desired Level.
public static Level toLevel(String sArg, Level defaultLevel)
defaultLevel
.
sArg
- The name of the desired Level.defaultLevel
- The Level to use if the String is invalid.
public boolean isAtLeastAsSpecificAs(Level level)
level
- The level to check.
public boolean isAtLeastAsSpecificAs(int level)
level
- The level to check.
public boolean lessOrEqual(Level level)
level
- The level to check.
public boolean lessOrEqual(int level)
level
- The level to check.
public int intLevel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |