Package ch.qos.logback.classic
Class Level
java.lang.Object
ch.qos.logback.classic.Level
- All Implemented Interfaces:
Serializable
Defines the set of levels recognized by logback-classic, that is
OFF, ERROR, WARN, INFO, DEBUG,
TRACE and ALL.
The Level class is final and cannot be sub-classed.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LevelTheALLis used to turn on all logging.static final intstatic final Integerstatic final LevelTheDEBUGlevel designates informational events of lower importance.static final intstatic final Integerstatic final LevelTheERRORlevel designates error events which may or not be fatal to the application.static final intstatic final Integerstatic final LevelTheINFOlevel designates informational messages highlighting overall progress of the application.static final intstatic final Integerfinal intfinal Stringstatic final LevelTheOFFis used to turn off logging.static final intstatic final Integerstatic final LevelTheTRACElevel designates informational events of very low importance.static final intstatic final Integerstatic final LevelTheWARNlevel designates potentially harmful situations.static final intstatic final Integer -
Method Summary
Modifier and TypeMethodDescriptionstatic LevelconvertAnSLF4JLevel(org.slf4j.event.Level slf4jLevel) static LevelfromLocationAwareLoggerInteger(int levelInt) Convert one of the integer values defined inLocationAwareLoggerinterface to an instance of this class, i.e.booleanReturnstrueif this Level has a higher or equal Level than the Level passed as argument,falseotherwise.inttoInt()Returns the integer representation of this Level.Convert a Level to an Integer object.static LeveltoLevel(int val) Convert an integer passed as argument to a Level.static LevelConvert an integer passed as argument to a Level.static LevelConvert the string passed as argument to a Level.static LevelConvert the string passed as argument to a Level.static intConvert this level instance to an integer value defined in theLocationAwareLoggerinterface.toString()Returns the string representation of this Level.static LevelThis method exists in order to comply with Joran's valueOf convention.
-
Field Details
-
OFF_INT
- See Also:
-
ERROR_INT
- See Also:
-
WARN_INT
- See Also:
-
INFO_INT
- See Also:
-
DEBUG_INT
- See Also:
-
TRACE_INT
- See Also:
-
ALL_INT
- See Also:
-
OFF_INTEGER
-
ERROR_INTEGER
-
WARN_INTEGER
-
INFO_INTEGER
-
DEBUG_INTEGER
-
TRACE_INTEGER
-
ALL_INTEGER
-
OFF
TheOFFis used to turn off logging. -
ERROR
TheERRORlevel designates error events which may or not be fatal to the application. -
WARN
TheWARNlevel designates potentially harmful situations. -
INFO
TheINFOlevel designates informational messages highlighting overall progress of the application. -
DEBUG
TheDEBUGlevel designates informational events of lower importance. -
TRACE
TheTRACElevel designates informational events of very low importance. -
ALL
TheALLis used to turn on all logging. -
levelInt
-
levelStr
-
-
Method Details
-
toString
Returns the string representation of this Level. -
toInt
Returns the integer representation of this Level. -
convertAnSLF4JLevel
-
toInteger
Convert a Level to an Integer object.- Returns:
- This level's Integer mapping.
-
isGreaterOrEqual
Returnstrueif this Level has a higher or equal Level than the Level passed as argument,falseotherwise. -
toLevel
Convert the string passed as argument to a Level. If the conversion fails, then this method returnsDEBUG. -
valueOf
This method exists in order to comply with Joran's valueOf convention.- Parameters:
sArg-- Returns:
-
toLevel
Convert an integer passed as argument to a Level. If the conversion fails, then this method returnsDEBUG. -
toLevel
Convert an integer passed as argument to a Level. If the conversion fails, then this method returns the specified default. -
toLevel
Convert the string passed as argument to a Level. If the conversion fails, then this method returns the value ofdefaultLevel. -
fromLocationAwareLoggerInteger
Convert one of the integer values defined inLocationAwareLoggerinterface to an instance of this class, i.e. a Level.- Parameters:
levelInt- An integer value representing a level as defined in LocationAwareLogger- Returns:
- an instance of this class, i.e. a Level.
- Since:
- 1.0.1
-
toLocationAwareLoggerInteger
Convert this level instance to an integer value defined in theLocationAwareLoggerinterface.- Parameters:
level- The level to convert to LocationAwareLogger integer- Returns:
- int An integer corresponding to this level as defined in LocationAwareLogger
- Since:
- 1.0.1
-