Package adams.core.logging
Enum LoggingLevel
- java.lang.Object
-
- java.lang.Enum<LoggingLevel>
-
- adams.core.logging.LoggingLevel
-
- All Implemented Interfaces:
Serializable
,Comparable<LoggingLevel>
public enum LoggingLevel extends Enum<LoggingLevel>
Enumeration of logging levels.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONFIG
configuration messages and above.FINE
some debugging and above.FINER
more debugging and above.FINEST
lots of debugging and above.INFO
info messages and above.OFF
no logging.SEVERE
only severe warnings.WARNING
only warnings and above.
-
Field Summary
Fields Modifier and Type Field Description protected LevelComparator
m_Comparator
the comparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Level
getLevel()
Returns the associated logging level.boolean
isAtLeast(Level min)
Checks whether the level meets the minimum.boolean
isAtMost(Level max)
Checks whether the level meets the maximum.static LoggingLevel
valueOf(String name)
Returns the enum constant of this type with the specified name.static LoggingLevel
valueOf(Level level)
Determines the associated LoggingLevel.static LoggingLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OFF
public static final LoggingLevel OFF
no logging.
-
SEVERE
public static final LoggingLevel SEVERE
only severe warnings.
-
WARNING
public static final LoggingLevel WARNING
only warnings and above.
-
INFO
public static final LoggingLevel INFO
info messages and above.
-
CONFIG
public static final LoggingLevel CONFIG
configuration messages and above.
-
FINE
public static final LoggingLevel FINE
some debugging and above.
-
FINER
public static final LoggingLevel FINER
more debugging and above.
-
FINEST
public static final LoggingLevel FINEST
lots of debugging and above.
-
-
Field Detail
-
m_Comparator
protected LevelComparator m_Comparator
the comparator.
-
-
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
-
getLevel
public Level getLevel()
Returns the associated logging level.- Returns:
- the level
-
valueOf
public static LoggingLevel valueOf(Level level)
Determines the associated LoggingLevel.- Parameters:
level
- the level to get the LoggingLevel for- Returns:
- the LoggingLevel, null if not found
-
isAtLeast
public boolean isAtLeast(Level min)
Checks whether the level meets the minimum.- Parameters:
min
- the minimum level to meet- Returns:
- if minimum logging level met
-
isAtMost
public boolean isAtMost(Level max)
Checks whether the level meets the maximum.- Parameters:
max
- the maximum level to meet- Returns:
- if maximum logging level met
-
-