Enum LoggingLevel
- java.lang.Object
-
- java.lang.Enum<LoggingLevel>
-
- org.codehaus.cargo.container.property.LoggingLevel
-
- All Implemented Interfaces:
Serializable
,Comparable<LoggingLevel>
public enum LoggingLevel extends Enum<LoggingLevel>
Supported logging levels forGeneralPropertySet.LOGGING
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equalsLevel(String level)
Tests whether the specified logging level equals this enum constant.String
getLevel()
Gets the string value of this logging level for use as a value of theGeneralPropertySet.LOGGING
property.static LoggingLevel
toLevel(String level)
Gets the enum constant matching the specified logging level.String
toString()
Gets the string value of this logging level for use as a value of theGeneralPropertySet.LOGGING
property.static LoggingLevel
valueOf(String name)
Returns the enum constant of this type with the specified name.static LoggingLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HIGH
public static final LoggingLevel HIGH
High amount of log output, e.g. debug logging.
-
MEDIUM
public static final LoggingLevel MEDIUM
Medium amount of log output, e.g. info and warn logging.
-
LOW
public static final LoggingLevel LOW
Low amount of log output, e.g. error logging only.
-
-
Method Detail
-
values
public static LoggingLevel[] 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 (LoggingLevel c : LoggingLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LoggingLevel 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
-
toLevel
public static LoggingLevel toLevel(String level)
Gets the enum constant matching the specified logging level. Note that unlikevalueOf(String)
this method matches the level name case-insensitively.- Parameters:
level
- The logging level.- Returns:
- The corrensponding enum constant, never
null
. - Throws:
IllegalArgumentException
- If the specified logging level is invalid.
-
equalsLevel
public boolean equalsLevel(String level)
Tests whether the specified logging level equals this enum constant.- Parameters:
level
- The logging level, may benull
.- Returns:
true
if the specified logging level equals this enum constant,false
otherwise.
-
getLevel
public String getLevel()
Gets the string value of this logging level for use as a value of theGeneralPropertySet.LOGGING
property.- Returns:
- The string value of this logging level.
-
toString
public String toString()
Gets the string value of this logging level for use as a value of theGeneralPropertySet.LOGGING
property.- Overrides:
toString
in classEnum<LoggingLevel>
- Returns:
- The string value of this logging level.
-
-