SK.gnome.dwarf.log
Class LogLevel

java.lang.Object
  extended bySK.gnome.dwarf.log.LogLevel

public final class LogLevel
extends java.lang.Object

Defines the logging levels.

The logging level represents a priority or an importance of the log message. A higher numerical value of the logging level means higher priority, and vice versa.

The logging services (also called logging adapters) can be setup to accept only messages with the particular logging levels.

The following logging levels are installed by this class automatically, listed from the lowest priority to the highest:

namenumerical levelstring description
LOG_XFER0"XFER"
LOG_TRACE10"TRACE"
LOG_DEBUG20"DEBUG"
LOG_INFO30"INFO"
LOG_WARN40"WARN"
LOG_ERROR50"ERROR"
LOG_FATAL60"FATAL"

The logging levels can be obtained also via the getInstance(String) and the getInstances() methods.


Method Summary
 java.lang.String getDescription()
          Returns the string description of the logging level.
static LogLevel getInstance(java.lang.String description)
          Returns a logging level by its description.
static java.util.Collection getInstances()
          Returns all logging levels currently available.
 int getLevel()
          Returns the numerical logging level.
 java.lang.String toString()
          Returns the string representation of the logging level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getLevel

public int getLevel()
Returns the numerical logging level.

Returns:
level the numerical level

getDescription

public java.lang.String getDescription()
Returns the string description of the logging level.

Returns:
level the description

toString

public java.lang.String toString()
Returns the string representation of the logging level.

Returns the same string as the getDescription() method.

Returns:
level the description

getInstance

public static LogLevel getInstance(java.lang.String description)
Returns a logging level by its description.

If there is no instance with the given description, a null is returned. The description argument is case insensitive.

Parameters:
description - the description of the level
Returns:
the logging level or null

getInstances

public static java.util.Collection getInstances()
Returns all logging levels currently available.

Returns:
all logging levels


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.