Package com.mooltiverse.oss.nyx.data
Enum Verbosity
- java.lang.Object
-
- java.lang.Enum<Verbosity>
-
- com.mooltiverse.oss.nyx.data.Verbosity
-
- All Implemented Interfaces:
Serializable
,Comparable<Verbosity>
public enum Verbosity extends Enum<Verbosity>
This class maps logLevel
s and the corresponding configuration options and state attributes, whose string representations may not always match theLevel
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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Verbosity
from(String value)
Returns the proper verbosity level mapped from the given value.static Verbosity
from(org.slf4j.event.Level level)
Returns the proper verbosity level mapped from the given SLF4J level.org.slf4j.event.Level
getLevel()
Returns the SLF4J level corresponding to this verbosity levelString
getValue()
Returns the string representation of this verbosity level.static Verbosity
valueOf(String name)
Returns the enum constant of this type with the specified name.static Verbosity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FATAL
public static final Verbosity 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:
Level.ERROR
-
ERROR
public static final Verbosity ERROR
The error log level.- See Also:
Level.ERROR
-
WARNING
public static final Verbosity WARNING
The warning log level.- See Also:
Level.WARN
-
INFO
public static final Verbosity INFO
The info log level.- See Also:
Level.INFO
-
DEBUG
public static final Verbosity DEBUG
The debug log level.- See Also:
Level.DEBUG
-
TRACE
public static final Verbosity TRACE
The trace log level.- See Also:
Level.TRACE
-
-
Method Detail
-
values
public static Verbosity[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Verbosity c : Verbosity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Verbosity valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getLevel
public org.slf4j.event.Level getLevel()
Returns the SLF4J level corresponding to this verbosity level- Returns:
- the SLF4J level corresponding to this verbosity level
-
getValue
public String getValue()
Returns the string representation of this verbosity level. This string is also used in configuration options and state attributes.- Returns:
- the string representation of this verbosity level
-
from
public static Verbosity from(org.slf4j.event.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
-
from
public static Verbosity from(String value) throws IllegalArgumentException, NullPointerException
Returns the proper verbosity level mapped from the given value.- Parameters:
value
- string value level to parse and return the verbosity for- Returns:
- the proper verbosity level mapped from the given value.
- Throws:
IllegalArgumentException
- if the given value cannot be mapped to any existing verbosity levelNullPointerException
- if the given value isnull
-
-