com.sapportals.portal.prt.logger
Class Level

java.lang.Object
  |
  +--com.sapportals.portal.prt.logger.Level
All Implemented Interfaces:
java.io.Serializable

public class Level
extends java.lang.Object
implements java.io.Serializable

This Level class defines a set of standart logging levels that can be used to control logging output.

See Also:
ILogger, Serialized Form

Field Summary
static Level ALL
           
static int ALL_ID
          ALL indicates that all message should be logged.
static Level INFO
           
static int INFO_ID
          INFO is a message level for informational message.
static Level OFF
           
static int OFF_ID
          OFF is a special level that can be used to turn off logging.
static Level SEVERE
           
static int SEVERE_ID
          SEVERE is a message level that indicates a serious failure.
static Level SYSTEM
           
static int SYSTEM_ID
          This level is used to LOG Information in anycase (like "Portal initialization done")
static Level WARNING
           
static int WARNING_ID
          WARNING is a message level indicating a potential problem.
 
Constructor Summary
protected Level(java.lang.String name, int value)
          Constructor for the Level object It is protected to allow subclassing for new constants definition.
 
Method Summary
 boolean equals(java.lang.Object levelObject)
          Tests if the level passed in argument is equal to this level.
static java.util.Enumeration getAllLevels()
          Returns an enumeration of all existing levels (ALL, INFO, OFF, SEVERE, WARNING)
 int intValue()
          Gets the integer value for this level.
static Level parse(java.lang.String name)
          Parse a level name into a Level.
 java.lang.String toString()
          Gets the name of this level.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OFF_ID

public static final int OFF_ID
OFF is a special level that can be used to turn off logging.

OFF

public static final Level OFF

SEVERE_ID

public static final int SEVERE_ID
SEVERE is a message level that indicates a serious failure.

SEVERE

public static final Level SEVERE

WARNING_ID

public static final int WARNING_ID
WARNING is a message level indicating a potential problem.

WARNING

public static final Level WARNING

INFO_ID

public static final int INFO_ID
INFO is a message level for informational message.

INFO

public static final Level INFO

ALL_ID

public static final int ALL_ID
ALL indicates that all message should be logged.

ALL

public static final Level ALL

SYSTEM_ID

public static final int SYSTEM_ID
This level is used to LOG Information in anycase (like "Portal initialization done")

SYSTEM

public static final Level SYSTEM
Constructor Detail

Level

protected Level(java.lang.String name,
                int value)
Constructor for the Level object It is protected to allow subclassing for new constants definition. If client needs to add new logging levels, they may subclass level and define new constants.
Parameters:
name - Name of the level.
value - The constant value associated to that name.
Method Detail

equals

public boolean equals(java.lang.Object levelObject)
Tests if the level passed in argument is equal to this level.
Overrides:
equals in class java.lang.Object
Parameters:
level - The object level to compare.
levelObject -  
Returns:
true if the two objects have the same level value.

intValue

public final int intValue()
Gets the integer value for this level. This integer value can be used for efficient ordering comparisons between Level objects.
Returns:
The integer value for this level.

toString

public final java.lang.String toString()
Gets the name of this level.
Overrides:
toString in class java.lang.Object
Returns:
The string name for this level, for example "INFO"

parse

public static Level parse(java.lang.String name)
                   throws java.lang.IllegalArgumentException
Parse a level name into a Level.
Parameters:
name - A level name.
Returns:
The level object witch matches the name.
Throws:
java.lang.IllegalArgumentException - Thrown if the name passes as an argument is not one of the known level names.
java.lang.IllegalArgumentException -  

getAllLevels

public static java.util.Enumeration getAllLevels()
Returns an enumeration of all existing levels (ALL, INFO, OFF, SEVERE, WARNING)
Returns:
An enumeration of all existing levels (ALL, INFO, OFF, SEVERE, WARNING)