public enum Level extends Enum<Level>
getCode()
method.
Available levels (in ascending order) are:
Enum Constant and Description |
---|
DEBUG
Debug level.
|
ERROR
Highest level.
|
FATAL
Highest level.
|
FINE
Lower level.
|
INFO
Defaut level.
|
WARNING
Warning level.
|
Modifier and Type | Field and Description |
---|---|
private String |
code
Level code.
|
private int |
level
Numeric value of the level.
|
Modifier and Type | Method and Description |
---|---|
String |
getCode()
Returns the code of this level.
|
boolean |
hasToLog(Level logLevel)
Test if a log has to be written.
|
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.
|
public static final Level FINE
public static final Level DEBUG
public static final Level INFO
public static final Level WARNING
public static final Level ERROR
public static final Level FATAL
private int level
private String code
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 nameNullPointerException
- if the argument is nullpublic String getCode()
public boolean hasToLog(Level logLevel)
This method should be invoked from the configuration level, having like argument the log level.
logLevel
- event leveltrue
if the log has to e logger, false
otherwise© 2013 andynaz - http://andynaz.altervista.org