Enum Class Verbosity

java.lang.Object
java.lang.Enum<Verbosity>
com.mooltiverse.oss.nyx.entities.Verbosity
All Implemented Interfaces:
Serializable, Comparable<Verbosity>, Constable

public enum Verbosity extends Enum<Verbosity>
This class maps log Levels 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.
  • Enum Constant Details

    • 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 as ERROR.
      See Also:
    • ERROR

      public static final Verbosity ERROR
      The error log level.
      See Also:
    • WARNING

      public static final Verbosity WARNING
      The warning log level.
      See Also:
    • INFO

      public static final Verbosity INFO
      The info log level.
      See Also:
    • DEBUG

      public static final Verbosity DEBUG
      The debug log level.
      See Also:
    • TRACE

      public static final Verbosity TRACE
      The trace log level.
      See Also:
  • Method Details

    • values

      public static Verbosity[] 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

      public static Verbosity valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getLevel

      public Level 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 level
      NullPointerException - if the given value is null