Package com.mooltiverse.oss.nyx.entities
Enum Class Verbosity
- All Implemented Interfaces:
Serializable
,Comparable<Verbosity>
,Constable
This class maps log
Level
s and the corresponding configuration options and state attributes,
whose string representations may not always match the Level
values.
In other words, here is the mapping between logging levels and the string values users can use in configuration
and state to ask for those logging levels.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Verbosity
Returns the proper verbosity level mapped from the given SLF4J level.getLevel()
Returns the SLF4J level corresponding to this verbosity levelstatic Verbosity
Returns the enum constant of this class with the specified name.static Verbosity[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FATAL
The fatal log level. Please note that this level has no corresponding level into SLF4J so the value is the same asERROR
.- See Also:
-
ERROR
The error log level.- See Also:
-
WARNING
The warning log level.- See Also:
-
INFO
The info log level.- See Also:
-
DEBUG
The debug log level.- See Also:
-
TRACE
The trace log level.- See Also:
-
-
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
-
getLevel
Returns the SLF4J level corresponding to this verbosity level- Returns:
- the SLF4J level corresponding to this verbosity level
-
fromLevel
public static Verbosity fromLevel(Level level) throws IllegalArgumentException, NullPointerException Returns the proper verbosity level mapped from the given SLF4J level.- Parameters:
level
- the SLF4J level to parse and return the verbosity for- Returns:
- the proper verbosity level mapped from the given SLF4J level.
- Throws:
IllegalArgumentException
- if the given value cannot be mapped to any existing verbosity levelNullPointerException
- if the given value isnull
-