Enum Class Loglevel
- All Implemented Interfaces:
Serializable, Comparable<Loglevel>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDebug level - Used for detailed diagnostic information during development.Error level - Used for error events that might still allow the application to continue.Fatal level - Used for severe error events that will presumably lead the application to abort.Info level - Used for informational messages about normal application flow.Warning level - Used for potentially harmful situations that don't prevent execution. -
Method Summary
Modifier and TypeMethodDescriptionintgetLevel()Gets the numeric severity value of this log level.booleanisHigherOrEqual(Loglevel other) Checks if this log level has equal or higher severity than the specified level.booleanisLowerThan(Loglevel other) Checks if this log level has lower severity than the specified 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 - Used for detailed diagnostic information during development. Lowest severity level (0). -
INFO
Info level - Used for informational messages about normal application flow. Severity level 1. -
WARN
Warning level - Used for potentially harmful situations that don't prevent execution. Severity level 2. -
ERROR
Error level - Used for error events that might still allow the application to continue. Severity level 3. -
FATAL
Fatal level - Used for severe error events that will presumably lead the application to abort. Highest severity level (4).
-
-
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
-
getLevel
public int getLevel()Gets the numeric severity value of this log level.- Returns:
- The numeric severity value.
-
isHigherOrEqual
Checks if this log level has equal or higher severity than the specified level.- Parameters:
other- The log level to compare against.- Returns:
trueif this level is higher or equal in severity,falseotherwise.
-
isLowerThan
Checks if this log level has lower severity than the specified level.- Parameters:
other- The log level to compare against.- Returns:
trueif this level is lower in severity,falseotherwise.
-