Enum Class LogLevel

java.lang.Object
java.lang.Enum<LogLevel>
org.omegazero.common.logging.LogLevel
All Implemented Interfaces:
Serializable, Comparable<LogLevel>, Constable

public enum LogLevel extends Enum<LogLevel>
Represents the importance level of a log message created by a Logger.
Since:
2.1
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Log level including messages for basic debugging.
    Messages indicating unusual error conditions, possibly requiring user intervention.
    Messages requiring immediate user intervention, because the application is no longer functioning properly.
    Information messages, relevant for application users.
    The highest log level.
    Information messages that may need additional attention.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the ANSI escape sequence string for setting the output terminal text to an appropriate color.
    int
    Returns an integer representation of a log level, starting with 0 being the lowest log level (FATAL).
     
    static LogLevel
    Returns the enum constant of this class with the specified name.
    static LogLevel[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • TRACE

      public static final LogLevel TRACE
      The highest log level. Includes very detailed messages about application state or operations.
    • DEBUG

      public static final LogLevel DEBUG
      Log level including messages for basic debugging.
    • INFO

      public static final LogLevel INFO
      Information messages, relevant for application users.
    • WARN

      public static final LogLevel WARN
      Information messages that may need additional attention.
    • ERROR

      public static final LogLevel ERROR
      Messages indicating unusual error conditions, possibly requiring user intervention.
    • FATAL

      public static final LogLevel FATAL
      Messages requiring immediate user intervention, because the application is no longer functioning properly.
  • Method Details

    • values

      public static LogLevel[] 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 LogLevel 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
    • level

      public int level()
      Returns an integer representation of a log level, starting with 0 being the lowest log level (FATAL).
      Returns:
      The log level as an integer
    • color

      public String color()
      Returns the ANSI escape sequence string for setting the output terminal text to an appropriate color.
      Returns:
      The escape sequence
    • toString

      public String toString()
      Overrides:
      toString in class Enum<LogLevel>