com.metamatrix.core.log
Class MessageLevel

java.lang.Object
  extended by com.metamatrix.core.log.MessageLevel

public final class MessageLevel
extends java.lang.Object

Constants that define the level of the messages that are to be recorded by the LogManager.


Nested Class Summary
static class MessageLevel.DisplayNames
          Constants that define the types of the messages that are to be recorded by the LogManager.
static class MessageLevel.Labels
          Constants that define the types of the messages that are to be recorded by the LogManager.
 
Field Summary
static int CRITICAL
          Message level value that specifies that critical messages are to be recorded.
static int DEFAULT_MESSAGE_LEVEL
          The default message level is WARNING.
static int DETAIL
          Message level value that specifies that detailed, information, warning, error and critical messages are to be recorded.
static int ERROR
          Message level value that specifies that error messages and critical messages are to be recorded.
static int INFO
          Message level value that specifies that information, warning, error and critical messages are to be recorded.
static int NONE
          Message level value that specifies that no messages are to be recorded.
static int TRACE
          Message level value that specifies that all messages are to be recorded.
static int WARNING
          Message level value that specifies that warning, error and critical messages are to be recorded.
 
Constructor Summary
MessageLevel()
           
 
Method Summary
static java.util.Collection getDisplayNames()
           
static java.lang.String getLabelForLevel(int level)
           
static java.util.List getLabels()
          Utility method to get the labels for the levels, starting with the lowest level and ending with the highest level.
static int getMaximumLevel()
           
static int getMinimumLevel()
           
static int getValidLowerMessageLevel()
          Utility method for knowing what is the lower boundary for a valid message level.
static int getValidUpperMessageLevel()
          Utility method for knowing what is the upper boundary for a valid message level.
static boolean isMessageLevelValid(int newMessageLevel)
          Utility method to set the level of messages that are recorded for this VM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

MessageLevel

public MessageLevel()
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 either MessageLevel.NONE, MessageLevel.CRITICAL, MessageLevel.ERROR, MessageLevel.WARNING, MessageLevel.INFO, MessageLevel.DETAIL, or MessageLevel.TRACE.
Throws:
java.lang.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:
#validUpperMessageLevel

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:
#validLowerMessageLevel

getLabelForLevel

public static java.lang.String getLabelForLevel(int level)

getMinimumLevel

public static int getMinimumLevel()

getMaximumLevel

public static int getMaximumLevel()

getDisplayNames

public static java.util.Collection getDisplayNames()

getLabels

public static java.util.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


Copyright © 2009. All Rights Reserved.