Enum Class LogLevel
- All Implemented Interfaces:
Serializable,Comparable<LogLevel>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintReturns the numeric priority of this log level.booleanChecks whether this log level is at least as severe as the given level.static LogLevelReturns the enum constant of this class with the specified name.static LogLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEBUG
Debug-level messages for detailed diagnostic information. -
INFO
Informational messages indicating normal operation. -
WARN
Warning messages indicating potential issues that do not prevent execution. -
ERROR
Error messages indicating failures that may require attention.
-
-
Method Details
-
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
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 nameNullPointerException- 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
Checks whether this log level is at least as severe as the given level.- Parameters:
other- the log level to compare against- Returns:
trueif this level's priority is greater than or equal toother's priority
-