com.resilientedge.util.logger
Class Level

java.lang.Object
  |
  +--com.resilientedge.util.logger.Level
All Implemented Interfaces:
LevelConstants, LoggingType

public class Level
extends java.lang.Object
implements LoggingType, LevelConstants

Contains static logging Levels and provides conversion methods.

Levels include:

Author:
odh

Fields inherited from interface com.resilientedge.util.logger.LevelConstants
CRITICAL_ERROR, CRITICAL_ERROR_STRING, DEBUG, DEBUG_STRING, ERROR, ERROR_STRING, INFO, INFO_STRING, TRACE, TRACE_STRING, UNKNOWN_LEVEL, WARNING, WARNING_STRING
 
Constructor Summary
Level(int value)
          Construct a Level with a supplied value.
 
Method Summary
 java.lang.String getName()
          Returns a string representing the name of the Level object, based upon its value.
 int getValue()
          Returns the Level object's value.
static int parseInt(java.lang.String name)
          Returns the value for a Level String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Level

public Level(int value)
Construct a Level with a supplied value.
Parameters:
value - the Level's value
Method Detail

getValue

public int getValue()
Returns the Level object's value.
Returns:
the Level's value.

getName

public java.lang.String getName()
                         throws UnknownLogTypeException
Returns a string representing the name of the Level object, based upon its value. If a name is not known for the Level's value, an UnknownLogTypeException is thrown.
Specified by:
getName in interface LoggingType
Returns:
the text name that corresponds to the Level.
Throws:
UnknownLogTypeException - thrown if the Level's value does not have a corresponding text name.

parseInt

public static int parseInt(java.lang.String name)
                    throws UnknownLogTypeException
Returns the value for a Level String. Throws UnknownLogTypeException if supplied level name is not recognized.
Parameters:
name - the text name to lookup
Returns:
the value for the supplied name.
Throws:
UnknownLogTypeException - thrown if the name is not recognized.


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.