Package org.teiid.logging
Class MessageLevel
- java.lang.Object
-
- org.teiid.logging.MessageLevel
-
public final class MessageLevel extends Object
Constants that define the level of the messages that are to be recorded by the LogManager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMessageLevel.DisplayNamesConstants that define the types of the messages that are to be recorded by the LogManager.static classMessageLevel.LabelsConstants that define the types of the messages that are to be recorded by the LogManager.
-
Field Summary
Fields Modifier and Type Field Description static intCRITICALMessage level value that specifies that critical messages are to be recorded.static intDEFAULT_MESSAGE_LEVELThe default message level is WARNING.static intDETAILMessage level value that specifies that detailed, information, warning, error and critical messages are to be recorded.static intERRORMessage level value that specifies that error messages and critical messages are to be recorded.static intINFOMessage level value that specifies that information, warning, error and critical messages are to be recorded.static intNONEMessage level value that specifies that no messages are to be recorded.static intTRACEMessage level value that specifies that all messages are to be recorded.static intWARNINGMessage level value that specifies that warning, error and critical messages are to be recorded.
-
Constructor Summary
Constructors Constructor Description MessageLevel()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CollectiongetDisplayNames()static StringgetLabelForLevel(int level)static ListgetLabels()Utility method to get the labels for the levels, starting with the lowest level and ending with the highest level.static intgetMaximumLevel()static intgetMinimumLevel()static intgetValidLowerMessageLevel()Utility method for knowing what is the lower boundary for a valid message level.static intgetValidUpperMessageLevel()Utility method for knowing what is the upper boundary for a valid message level.static booleanisMessageLevelValid(int newMessageLevel)Utility method to set the level of messages that are recorded for this VM.
-
-
-
Field Detail
-
NONE
public static final int NONE
Message level value that specifies that no messages are to be recorded.- See Also:
- Constant Field Values
-
CRITICAL
public static final int CRITICAL
Message level value that specifies that critical messages are to be recorded.- See Also:
- Constant Field Values
-
ERROR
public static final int ERROR
Message level value that specifies that error messages and critical messages are to be recorded.- See Also:
- Constant Field Values
-
WARNING
public static final int WARNING
Message level value that specifies that warning, error and critical messages are to be recorded.- See Also:
- Constant Field Values
-
INFO
public static final int INFO
Message level value that specifies that information, warning, error and critical messages are to be recorded.- See Also:
- Constant Field Values
-
DETAIL
public static final int DETAIL
Message level value that specifies that detailed, information, warning, error and critical messages are to be recorded.- See Also:
- Constant Field Values
-
TRACE
public static final int TRACE
Message level value that specifies that all messages are to be recorded.- See Also:
- Constant Field Values
-
DEFAULT_MESSAGE_LEVEL
public static final int DEFAULT_MESSAGE_LEVEL
The default message level is WARNING.- See Also:
- Constant Field Values
-
-
Method Detail
-
isMessageLevelValid
public static boolean isMessageLevelValid(int newMessageLevel)
Utility method to set the level of messages that are recorded for this VM.- Parameters:
newMessageLevel- the new level; must be eitherMessageLevel.NONE,MessageLevel.CRITICAL,MessageLevel.ERROR,MessageLevel.WARNING,MessageLevel.INFO,MessageLevel.DETAIL, orMessageLevel.TRACE.- Throws:
IllegalArgumentException- if the level is out of range.
-
getValidLowerMessageLevel
public static int getValidLowerMessageLevel()
Utility method for knowing what is the lower boundary for a valid message level.- Returns:
- int message level
- See Also:
NONE
-
getValidUpperMessageLevel
public static int getValidUpperMessageLevel()
Utility method for knowing what is the upper boundary for a valid message level.- Returns:
- int message level
- See Also:
TRACE
-
getLabelForLevel
public static String getLabelForLevel(int level)
-
getMinimumLevel
public static int getMinimumLevel()
-
getMaximumLevel
public static int getMaximumLevel()
-
getDisplayNames
public static Collection getDisplayNames()
-
getLabels
public static List getLabels()
Utility method to get the labels for the levels, starting with the lowest level and ending with the highest level.- Returns:
- an ordered list of String labels
-
-