java.util.logging
Class Level
java.lang.Object
|
+--java.util.logging.Level
All Implemented Interfaces:
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:- Sascha Brawer <brawer@acm.org>
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:- Sascha Brawer <brawer@acm.org>
SEVERE
public static final Level SEVERE
WARNING
public static final Level WARNING
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:
equals
public boolean equals(java.lang.Object other)
Checks whether this Level's integer value is equal to that of
another object.
Parameters:
Returns:
true
if other
is an instance of
java.util.logging.Level
and has the same integer
value, false
otherwise.
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:
- the name of the resource bundle used for localizing the
level name, or
null
if the name does not undergo
localization.
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".
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.