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
Modifier and TypeFieldDescriptionstatic final Level
TheALL
is used to turn on all logging.static final int
static final Integer
static final Level
TheDEBUG
level designates informational events of lower importance.static final int
static final Integer
static final Level
TheERROR
level designates error events which may or not be fatal to the application.static final int
static final Integer
static final Level
TheINFO
level designates informational messages highlighting overall progress of the application.static final int
static final Integer
final int
final String
static final Level
TheOFF
is used to turn off logging.static final int
static final Integer
static final Level
TheTRACE
level designates informational events of very low importance.static final int
static final Integer
static final Level
TheWARN
level designates potentially harmful situations.static final int
static final Integer
-
Method Summary
Modifier and TypeMethodDescriptionstatic Level
convertAnSLF4JLevel
(org.slf4j.event.Level slf4jLevel) static Level
fromLocationAwareLoggerInteger
(int levelInt) Convert one of the integer values defined inLocationAwareLogger
interface to an instance of this class, i.e.boolean
Returnstrue
if this Level has a higher or equal Level than the Level passed as argument,false
otherwise.int
toInt()
Returns the integer representation of this Level.Convert a Level to an Integer object.static Level
toLevel
(int val) Convert an integer passed as argument to a Level.static Level
Convert an integer passed as argument to a Level.static Level
Convert the string passed as argument to a Level.static Level
Convert the string passed as argument to a Level.static int
Convert this level instance to an integer value defined in theLocationAwareLogger
interface.toString()
Returns the string representation of this Level.static Level
This 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
TheOFF
is used to turn off logging. -
ERROR
TheERROR
level designates error events which may or not be fatal to the application. -
WARN
TheWARN
level designates potentially harmful situations. -
INFO
TheINFO
level designates informational messages highlighting overall progress of the application. -
DEBUG
TheDEBUG
level designates informational events of lower importance. -
TRACE
TheTRACE
level designates informational events of very low importance. -
ALL
TheALL
is 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
Returnstrue
if this Level has a higher or equal Level than the Level passed as argument,false
otherwise. -
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 inLocationAwareLogger
interface 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 theLocationAwareLogger
interface.- 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
-