Package com.sodius.mdw.core.util.log
Class Level
- java.lang.Object
-
- com.sodius.mdw.core.util.log.Level
-
public final class Level extends Object
TheLevelclass defines a set of standard logging levels that can be used to control logging output. Enabling logging at a given level also enables logging at all higher levels.The levels in descending order are:
- ERROR
- WARNING
- INFO
- DEBUG
This class cannot be instantiated or subclassed by clients.
- See Also:
Logger.setLevel(Level)
-
-
Field Summary
Fields Modifier and Type Field Description static LevelDEBUGDEBUGlevel is used to assist in debugging problems that may be associated with particular configurations.static LevelERRORERRORlevel should describe events that are of considerable importance and which will prevent normal program execution.static LevelINFOINFOlevel should only be used for reasonably significant messages that will make sense to end users and system admins.static LevelWARNINGWARNINGlevel should describe events that will be of interest to end users or system managers, or which indicate potential problems.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Level level)Compares this level with the specified level for order.booleanisDebug()Returnstrueif this level isDEBUG.booleanisError()Returnstrueif this level isERROR.booleanisInfo()Returnstrueif this level isINFO.booleanisWarning()Returnstrueif this level isWARNING.StringtoString()Returns aStringrepresentation of this level.
-
-
-
Field Detail
-
DEBUG
public static final Level DEBUG
DEBUGlevel is used to assist in debugging problems that may be associated with particular configurations.
-
INFO
public static final Level INFO
INFOlevel should only be used for reasonably significant messages that will make sense to end users and system admins.
-
WARNING
public static final Level WARNING
WARNINGlevel should describe events that will be of interest to end users or system managers, or which indicate potential problems.
-
ERROR
public static final Level ERROR
ERRORlevel should describe events that are of considerable importance and which will prevent normal program execution.
-
-
Method Detail
-
compareTo
public int compareTo(Level level)
Compares this level with the specified level for order. Returns a negative integer, zero, or a positive integer as this level is less than, equal to, or greater than the specified level.
The lowest level is
DEBUG, the highest isERROR- Parameters:
level- the level to compare with.- Returns:
- a negative integer, zero, or a positive integer as this level is less than, equal to, or greater than the specified level.
-
isDebug
public boolean isDebug()
Returnstrueif this level isDEBUG.- Returns:
trueif this level isDEBUG,falseotherwise.
-
isInfo
public boolean isInfo()
Returnstrueif this level isINFO.- Returns:
trueif this level isINFO,falseotherwise.
-
isWarning
public boolean isWarning()
Returnstrueif this level isWARNING.- Returns:
trueif this level isWARNING,falseotherwise.
-
isError
public boolean isError()
Returnstrueif this level isERROR.- Returns:
trueif this level isERROR,falseotherwise.
-
-