Enum Class Level

java.lang.Object
java.lang.Enum<Level>
com.codingchili.core.logging.Level
All Implemented Interfaces:
LogLevel, Serializable, Comparable<Level>, Constable

public enum Level extends Enum<Level> implements LogLevel
logging level definitions.
  • Enum Constant Details

    • INFO

      public static final Level INFO
    • WARNING

      public static final Level WARNING
    • ERROR

      public static final Level ERROR
    • SPECIAL

      public static final Level SPECIAL
    • RESERVED

      public static final Level RESERVED
    • NONE

      public static final Level NONE
    • SEVERE

      public static final Level SEVERE
  • Method Details

    • values

      public static Level[] 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 Level 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
    • setColor

      public void setColor(org.fusesource.jansi.Ansi.Color color)
      Changes the default color of the log level to the given.
      Parameters:
      color - see Ansi.Color
    • getName

      public String getName()
      Specified by:
      getName in interface LogLevel
      Returns:
      the name of the logging level.
    • apply

      public org.fusesource.jansi.Ansi apply(org.fusesource.jansi.Ansi ansi)
      Specified by:
      apply in interface LogLevel
      Parameters:
      ansi - the ansi instance to apply styling to, see Ansi.fg(Ansi.Color) or Ansi.fgBright(Ansi.Color).
      Returns:
      ansi instance with color updated.