Enum Class LogLevel

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

public enum LogLevel extends Enum<LogLevel>
Enumeration of logging levels supported by log4Rich. Levels are ordered from most verbose (TRACE) to least verbose (OFF).
  • Enum Constant Details

    • TRACE

      public static final LogLevel TRACE
      Most verbose logging level, shows all messages
    • DEBUG

      public static final LogLevel DEBUG
      Debug level for detailed diagnostic information
    • INFO

      public static final LogLevel INFO
      General information about application progress
    • WARN

      public static final LogLevel WARN
      Warning level for potentially harmful situations
    • ERROR

      public static final LogLevel ERROR
      Error level for error events that still allow application to continue
    • FATAL

      public static final LogLevel FATAL
      Fatal level for severe error events that will lead to application termination
    • OFF

      public static final LogLevel OFF
      Turns off all logging
  • 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
    • getValue

      public int getValue()
      Gets the numeric value of this log level. Lower values indicate more verbose logging.
      Returns:
      the numeric value of this log level
    • isGreaterOrEqual

      public boolean isGreaterOrEqual(LogLevel level)
      Check if this level is enabled for the given level.
      Parameters:
      level - The level to check against
      Returns:
      true if this level is greater than or equal to the given level
    • fromString

      public static LogLevel fromString(String level)
      Parse a string to get the corresponding LogLevel.
      Parameters:
      level - The string representation of the level
      Returns:
      The corresponding LogLevel, or INFO if not found