Enum Class LogLevel
- All Implemented Interfaces:
Serializable
,Comparable<LogLevel>
,Constable
Represents standard log severity levels used for validation feedback
and internal diagnostics.
This enum serves as a semantic bridge between commonly used log level
names (such as TRACE
, WARN
, ERROR
) and their
corresponding Level
constants.
It is used primarily in situations where validation failures or warnings are logged rather than thrown as exceptions.
Example usage:
logger.log(LogLevel.WARN.toJavaUtilLevel(), "Validation issue detected...");
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA fine-grained debug message.A serious error that should be brought to immediate attention.A standard informational message.The lowest level of logging, typically used for very fine-grained tracing.A warning that indicates a potential issue or recoverable problem. -
Method Summary
-
Enum Constant Details
-
TRACE
The lowest level of logging, typically used for very fine-grained tracing. Maps toLevel.FINEST
. -
DEBUG
A fine-grained debug message. Maps toLevel.FINER
. -
INFO
A standard informational message. Maps toLevel.INFO
. -
WARN
A warning that indicates a potential issue or recoverable problem. Maps toLevel.WARNING
. -
ERROR
A serious error that should be brought to immediate attention. Maps toLevel.SEVERE
.
-
-
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
-
toJavaUtilLevel
Returns the correspondingLevel
for this log level.- Returns:
- the mapped
java.util.logging.Level
-