Package org.omegazero.common.logging
Enum Class LogLevel
- All Implemented Interfaces:
Serializable
,Comparable<LogLevel>
,Constable
Represents the importance level of a log message created by a
Logger
.- Since:
- 2.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLog level including messages for basic debugging.Messages indicating unusual error conditions, possibly requiring user intervention.Messages requiring immediate user intervention, because the application is no longer functioning properly.Information messages, relevant for application users.The highest log level.Information messages that may need additional attention. -
Method Summary
Modifier and TypeMethodDescriptioncolor()
Returns the ANSI escape sequence string for setting the output terminal text to an appropriate color.int
level()
Returns an integer representation of a log level, starting with 0 being the lowest log level (FATAL
).toString()
static LogLevel
Returns 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
-
TRACE
The highest log level. Includes very detailed messages about application state or operations. -
DEBUG
Log level including messages for basic debugging. -
INFO
Information messages, relevant for application users. -
WARN
Information messages that may need additional attention. -
ERROR
Messages indicating unusual error conditions, possibly requiring user intervention. -
FATAL
Messages requiring immediate user intervention, because the application is no longer functioning properly.
-
-
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
-
level
public int level()Returns an integer representation of a log level, starting with 0 being the lowest log level (FATAL
).- Returns:
- The log level as an integer
-
color
Returns the ANSI escape sequence string for setting the output terminal text to an appropriate color.- Returns:
- The escape sequence
-
toString
-