Package de.cuioss.test.juli
Enum Class TestLogLevel
- All Implemented Interfaces:
Serializable
,Comparable<TestLogLevel>
,Constable
Defines the log-levels with implicit mapping to JUL log level according to:
SLF4JBridgeHandler
- Author:
- Oliver Wolff
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDebug Level, maps toLevel.FINE
.Error Level, maps toLevel.SEVERE
.Info Level, maps toLevel.INFO
.Trace Level, maps toLevel.FINER
.Warn Level, maps toLevel.WARNING
. -
Method Summary
Modifier and TypeMethodDescriptionConvenient method for setting a Log-Level in the context of the currentTestLogLevel
Convenient method for setting a Log-Level in context of the currentTestLogLevel
static TestLogLevel
Convenient method for setting the root-logger-level in the context of the currentTestLogLevel
static TestLogLevel
Returns the enum constant of this class with the specified name.static TestLogLevel[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TRACE
Trace Level, maps toLevel.FINER
. -
DEBUG
Debug Level, maps toLevel.FINE
. -
INFO
Info Level, maps toLevel.INFO
. -
WARN
Warn Level, maps toLevel.WARNING
. -
ERROR
Error Level, maps toLevel.SEVERE
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
setAsRootLevel
Convenient method for setting the root-logger-level in the context of the currentTestLogLevel
- Returns:
- the
TestLogLevel
itself in order to us is in a fluent way
-
addLogger
Convenient method for setting a Log-Level in the context of the currentTestLogLevel
- Parameters:
className
- if it isnull
it will set the root-logger for the actual Log-Level- Returns:
- the
TestLogLevel
itself in order to us is in a fluent way
-
addLogger
Convenient method for setting a Log-Level in context of the currentTestLogLevel
- Parameters:
loggerName
- if it isnull
or empty it will set the root-logger for the actual Log-Level- Returns:
- the
TestLogLevel
itself in order to us is in a fluent way
-
parse
- Parameters:
level
- to be parsed, must not be null- Returns:
- the mapped level or
INFO
if the level can not be mapped
-