Enum Class LogLevel

java.lang.Object
java.lang.Enum<LogLevel>
com.scivicslab.turingworkflow.plugins.logdb.LogLevel
All Implemented Interfaces:
Serializable, Comparable<LogLevel>, Constable

public enum LogLevel extends Enum<LogLevel>
Log levels for distributed logging.

Each level has a numeric priority, where higher values indicate more severe log events. Levels can be compared using isAtLeast(LogLevel) to support filtering by minimum severity.

Since:
1.0
Author:
devteam@scivicslab.com
  • Enum Constant Details

    • DEBUG

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

      public static final LogLevel INFO
      Informational messages indicating normal operation.
    • WARN

      public static final LogLevel WARN
      Warning messages indicating potential issues that do not prevent execution.
    • ERROR

      public static final LogLevel ERROR
      Error messages indicating failures that may require attention.
  • 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
    • getPriority

      public int getPriority()
      Returns the numeric priority of this log level.
      Returns:
      the priority value (0 for DEBUG, 1 for INFO, 2 for WARN, 3 for ERROR)
    • isAtLeast

      public boolean isAtLeast(LogLevel other)
      Checks whether this log level is at least as severe as the given level.
      Parameters:
      other - the log level to compare against
      Returns:
      true if this level's priority is greater than or equal to other's priority