Package com.composum.sling.core.logging
Enum Message.Level
- java.lang.Object
-
- java.lang.Enum<Message.Level>
-
- com.composum.sling.core.logging.Message.Level
-
- All Implemented Interfaces:
Serializable
,Comparable<Message.Level>
- Enclosing class:
- Message
public static enum Message.Level extends Enum<Message.Level>
Kind of message, also used as loglevel when this is logged.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description debug
Detailed informations that are not normally shown to users, but could help to investigate problems if required.error
Problems that require the users attention.info
Informational messages for further details.none
Special category mainly useful asMessage.getLogLevel()
which means the message is not being logged.warn
A warning that might or might not indicate that the result of an operation could have had errorneous results.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isError()
Returns true if the level is an error - that is, the user needs to be informed in any case.static Message.Level
valueOf(String name)
Returns the enum constant of this type with the specified name.static Message.Level[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
error
public static final Message.Level error
Problems that require the users attention. This usually means that an operation was aborted or yielded errorneous results.
-
warn
public static final Message.Level warn
A warning that might or might not indicate that the result of an operation could have had errorneous results.
-
info
public static final Message.Level info
Informational messages for further details.
-
debug
public static final Message.Level debug
Detailed informations that are not normally shown to users, but could help to investigate problems if required.
-
none
public static final Message.Level none
Special category mainly useful asMessage.getLogLevel()
which means the message is not being logged.
-
-
Method Detail
-
values
public static Message.Level[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Message.Level c : Message.Level.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Message.Level valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
isError
public boolean isError()
Returns true if the level is an error - that is, the user needs to be informed in any case.
-
-