Package edu.cnu.mdi.log
Enum Class Log.Level
- All Implemented Interfaces:
Serializable,Comparable<Log.Level>,Constable
- Enclosing class:
Log
Severity levels for log messages.
Each constant carries its own dispatch logic via an abstract
dispatch(ILogListener, String) method, eliminating the need
for a switch statement in the notification loop.
-
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 TypeMethodDescriptionabstract voiddispatch(ILogListener listener, String message) Dispatchmessageto the appropriate method onlistenerfor this level.static Log.LevelReturns the enum constant of this class with the specified name.static Log.Level[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INFO
Normal application events. -
CONFIG
Application configuration and setup events. -
WARNING
Recoverable problems or unexpected conditions. -
ERROR
Significant failures that may have prevented an operation. -
EXCEPTION
Unhandled exceptions.The message contains the full stack trace produced by
Log.exception(Throwable).
-
-
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
-
dispatch
Dispatchmessageto the appropriate method onlistenerfor this level.- Parameters:
listener- the target listener; nevernullmessage- the log message; nevernull
-