Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.util.logging

Class Level

java.lang.Object
|
+--java.util.logging.Level

All Implemented Interfaces:

Serializable


public class Level

extends Object

implements Serializable

A class for indicating logging levels. A number of commonly used levels is pre-defined (such as java.util.logging.Level.INFO), and applications should utilize those whenever possible. For specialized purposes, however, applications can sub-class Level in order to define custom logging levels.

Author:

Field Summary

static java.util.logging.LevelALL

static java.util.logging.LevelCONFIG

static java.util.logging.LevelFINE

static java.util.logging.LevelFINER

static java.util.logging.LevelFINEST

static java.util.logging.LevelINFO

static java.util.logging.LevelOFF

A class for indicating logging levels.
static java.util.logging.LevelSEVERE

static java.util.logging.LevelWARNING

Constructor Summary

Level(java.lang.String name, int value)

Creates a logging level given a name and an integer value.
Level(java.lang.String name, int value, java.lang.String resourceBundleName)

Create a logging level given a name, an integer value and a name of a resource bundle for localizing the level name.

Method Summary

booleanequals(java.lang.Object other)

Checks whether this Level's integer value is equal to that of another object.
java.lang.StringgetLocalizedName()

Returns the name of the Level after localizing it, for example "WARNUNG".
java.lang.StringgetName()

Returns the name of the Level without localizing it, for example "WARNING".
java.lang.StringgetResourceBundleName()

Returns the name of the resource bundle used for localizing the level name.
inthashCode()

intintValue()

Returns the integer value of the Level.
static java.util.logging.Levelparse(java.lang.String name)

Returns one of the standard Levels given either its name or its integer value.
java.lang.StringtoString()

Returns the name of the Level without localizing it, for example "WARNING".

Field Details

ALL

public static final Level ALL


CONFIG

public static final Level CONFIG


FINE

public static final Level FINE


FINER

public static final Level FINER


FINEST

public static final Level FINEST


INFO

public static final Level INFO


OFF

public static final Level OFF

A class for indicating logging levels. A number of commonly used levels is pre-defined (such as java.util.logging.Level.INFO), and applications should utilize those whenever possible. For specialized purposes, however, applications can sub-class Level in order to define custom logging levels.

Author:

SEVERE

public static final Level SEVERE


WARNING

public static final Level WARNING


Constructor Details

Level

protected Level(java.lang.String name, int value)

Creates a logging level given a name and an integer value. It rarely is necessary to create custom levels, as most applications should be well served with one of the standard levels such as Level.CONFIG, Level.INFO, or Level.FINE.

Parameters:


Level

protected Level(java.lang.String name, int value, java.lang.String resourceBundleName)

Create a logging level given a name, an integer value and a name of a resource bundle for localizing the level name. It rarely is necessary to create custom levels, as most applications should be well served with one of the standard levels such as Level.CONFIG, Level.INFO, or Level.FINE.

Parameters:


Method Details

equals

public boolean equals(java.lang.Object other)

Checks whether this Level's integer value is equal to that of another object.

Parameters:

Returns:


getLocalizedName

public String getLocalizedName()

Returns the name of the Level after localizing it, for example "WARNUNG".


getName

public String getName()

Returns the name of the Level without localizing it, for example "WARNING".


getResourceBundleName

public String getResourceBundleName()

Returns the name of the resource bundle used for localizing the level name.

Returns:


hashCode

public int hashCode()


intValue

public final int intValue()

Returns the integer value of the Level.


parse

public static Level parse(java.lang.String name)

Returns one of the standard Levels given either its name or its integer value. Custom subclasses of Level will not be returned by this method.

Parameters:

Throws:


toString

public final String toString()

Returns the name of the Level without localizing it, for example "WARNING".