- java.lang.Object
-
- java.lang.Enum<CliLogLevel>
-
- io.github.mmm.cli.io.CliLogLevel
-
- All Implemented Interfaces:
Serializable,Comparable<CliLogLevel>
public enum CliLogLevel extends Enum<CliLogLevel>
Enumfor the levels to log to aCliConsoleImpl.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEBUGDebug information with details for developers and to get more details in case of problems or errors.ERRORError information if something went wrong and processing typically failed and has to be aborted.INFOGeneral information for end-users to get helpful feedback about what is going on.WARNINGWarning information if something is not as expected but does not prevent further processing.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanincludes(CliLogLevel level)static CliLogLevelvalueOf(String name)Returns the enum constant of this type with the specified name.static CliLogLevel[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEBUG
public static final CliLogLevel DEBUG
Debug information with details for developers and to get more details in case of problems or errors.
-
INFO
public static final CliLogLevel INFO
General information for end-users to get helpful feedback about what is going on.
-
WARNING
public static final CliLogLevel WARNING
Warning information if something is not as expected but does not prevent further processing.
-
ERROR
public static final CliLogLevel ERROR
Error information if something went wrong and processing typically failed and has to be aborted.
-
-
Method Detail
-
values
public static CliLogLevel[] 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 (CliLogLevel c : CliLogLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CliLogLevel 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
-
includes
public boolean includes(CliLogLevel level)
- Parameters:
level- theCliLogLevelto check (e.g. that is going to be logged).- Returns:
trueif thisCliLogLevelincludes the givenCliLogLevel,falseotherwise. In other words this method checks if theseverityof the givenCliLogLevelis greater or equal to thisCliLogLevel. So if this method is invoked on thecurrent log-levelof theCliConsolewith thelevel to logthe result will indicate if the message should be logged (or in case offalsebe suppressed).
-
-