com.sapportals.portal.prt.logger

Class Level

java.lang.Object
  extended bycom.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 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, 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.

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.

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.

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)


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.