it.andynaz.log
public enum Level extends Enum<Level>
getCode()
method.
Available levels (in ascending order) are:
Enum Constant and Description |
---|
DEBUG
Debug level.
|
ERROR
Highest level.
|
FINE
Lower level.
|
FINEST
Deprecated.
by now it is the same value of the
FINE level; this
level will be removed in future release |
INFO
Defaut level.
|
SEVERE
Deprecated.
by now it is the same value of the
SEVERE level; this
level will be removed in future release |
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.
|
@Deprecated public static final Level FINEST
FINE
level; this
level will be removed in future releasepublic static final Level FINE
public static final Level DEBUG
public static final Level INFO
public static final Level WARNING
@Deprecated public static final Level SEVERE
SEVERE
level; this
level will be removed in future releasepublic static final Level ERROR
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