com.sapportals.portal.prt.logger

Class Level

java.lang.Object
  extended by com.sapportals.portal.prt.logger.Level
All Implemented Interfaces:
Serializable

public class Level
extends Object
implements 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(String name, int value)
          Constructor for the Level object It is protected to allow subclassing for new constants definition.
 
Method Summary
 boolean equals(Object levelObject)
          Tests if the level passed in argument is equal to this level.
static Enumeration getAllLevels()
          Returns an enumeration of all existing levels (ALL, INFO, OFF, SEVERE, WARNING)
 int hashCode()
           
 int intValue()
          Gets the integer value for this level.
static Level parse(String name)
          Parse a level name into a Level.
 String toString()
          Gets the name of this level.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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.

See Also:
Constant Field Values

OFF

public static final Level OFF

SEVERE_ID

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

See Also:
Constant Field Values

SEVERE

public static final Level SEVERE

WARNING_ID

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

See Also:
Constant Field Values

WARNING

public static final Level WARNING

INFO_ID

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

See Also:
Constant Field Values

INFO

public static final Level INFO

ALL_ID

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

See Also:
Constant Field Values

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")

See Also:
Constant Field Values

SYSTEM

public static final Level SYSTEM
Constructor Detail

Level

protected Level(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(Object levelObject)
Tests if the level passed in argument is equal to this level.

Overrides:
equals in class Object
Parameters:
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 String toString()
Gets the name of this level.

Overrides:
toString in class Object
Returns:
The string name for this level, for example "INFO"

parse

public static Level parse(String name)
                   throws IllegalArgumentException
Parse a level name into a Level.

Parameters:
name - A level name.
Returns:
The level object witch matches the name.
Throws:
IllegalArgumentException - Thrown if the name passes as an argument is not one of the known level names.
IllegalArgumentException

getAllLevels

public static 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)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] epbc.prtapi._apideprecated default EP-PIN-PRT
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/lib/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice