Enum Verbosity

  • All Implemented Interfaces:
    Serializable, Comparable<Verbosity>

    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 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 as ERROR.
        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 name
        NullPointerException - 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 level
        NullPointerException - if the given value is null