Clients should normally use the predefined Level constants such as Level.SEVERE.
The levels in descending order are:
It is possible for third parties to define additional logging levels by subclassing Level. In such cases subclasses should take care to chose unique integer level values and to ensure that they maintain the Object uniqueness property across serialization by defining a suitable readResolve method.
Modifier and Type | Class and Description |
---|---|
pack-priv static class | |
private static class |
Modifier and Type | Field and Description |
---|---|
public static final Level | ALL
ALL indicates that all messages should be logged. |
private transient Locale | |
public static final Level | CONFIG
CONFIG is a message level for static configuration messages. |
private static final String | |
public static final Level | FINE
FINE is a message level providing tracing information. |
public static final Level | FINER
FINER indicates a fairly detailed tracing message. |
public static final Level | FINEST
FINEST indicates a highly detailed tracing message. |
public static final Level | INFO
INFO is a message level for informational messages. |
private transient String | |
private final String | |
public static final Level | OFF
OFF is a special level that can be used to turn off logging. |
private final String | |
private static final long | |
public static final Level | SEVERE
SEVERE is a message level indicating a serious failure. |
private static final Level[] | |
private final int | |
public static final Level | WARNING
WARNING is a message level indicating a potential problem. |
Access | Constructor and Description |
---|---|
protected | |
protected | Level(String
the name of the Level, for example "SEVERE". name, int an integer value for the level. value, String name of a resource bundle to use in
localizing the given name. If the resourceBundleName is null
or an empty string, it is ignored. resourceBundleName)Create a named Level with a given integer value and a given localization resource name. |
private |
Modifier and Type | Method and Description |
---|---|
private String | |
public boolean | Returns: true if and only if the two objects have the same level value.the reference object with which to compare. ox)Overrides java. Compare two objects for value equality. |
pack-priv static Level | |
pack-priv final String | |
pack-priv final String | |
pack-priv final synchronized String | |
public String | Returns: localized nameReturn the localized string name of the Level, for the current default locale. |
public String | |
public String | Returns: localization resource bundle nameReturn the level's localization resource bundle name, or null if no localization bundle is defined. |
public int | Returns: a hashcode based on the level valueOverrides java. Generate a hashcode. |
public final int | |
public static synchronized Level | Returns: The parsed value. Passing an integer that corresponds to a known name (e.g., 700) will return the associated name (e.g.,CONFIG ).
Passing an integer that does not (e.g., 1) will return a new level name
initialized to that value.string to be parsed name)Parse a level name string into a Level. |
private Object | Returns: aLevel instance corresponding to the deserialized
object.Returns a |
public final String | Returns: the non-localized name of the Level, for example "INFO".Overrides java. Returns a string representation of this Level. |
ALL | back to summary |
---|---|
public static final Level ALL ALL indicates that all messages should be logged.
This level is initialized to |
cachedLocale | back to summary |
---|---|
private transient Locale cachedLocale |
CONFIG | back to summary |
---|---|
public static final Level CONFIG CONFIG is a message level for static configuration messages.
CONFIG messages are intended to provide a variety of static
configuration information, to assist in debugging problems
that may be associated with particular configurations.
For example, CONFIG message might include the CPU type,
the graphics depth, the GUI look-and-feel, etc.
This level is initialized to |
defaultBundle | back to summary |
---|---|
private static final String defaultBundle |
FINE | back to summary |
---|---|
public static final Level FINE FINE is a message level providing tracing information. All of FINE, FINER, and FINEST are intended for relatively detailed tracing. The exact meaning of the three levels will vary between subsystems, but in general, FINEST should be used for the most voluminous detailed output, FINER for somewhat less detailed output, and FINE for the lowest volume (and most important) messages. In general the FINE level should be used for information that will be broadly interesting to developers who do not have a specialized interest in the specific subsystem.
FINE messages might include things like minor (recoverable)
failures. Issues indicating potential performance problems
are also worth logging as FINE.
This level is initialized to |
FINER | back to summary |
---|---|
public static final Level FINER FINER indicates a fairly detailed tracing message.
By default logging calls for entering, returning, or throwing
an exception are traced at this level.
This level is initialized to |
FINEST | back to summary |
---|---|
public static final Level FINEST FINEST indicates a highly detailed tracing message.
This level is initialized to |
INFO | back to summary |
---|---|
public static final Level INFO INFO is a message level for informational messages.
Typically INFO messages will be written to the console
or its equivalent. So the INFO level should only be
used for reasonably significant messages that will
make sense to end users and system administrators.
This level is initialized to |
localizedLevelName | back to summary |
---|---|
private transient String localizedLevelName |
name | back to summary |
---|---|
private final String name |
OFF | back to summary |
---|---|
public static final Level OFF OFF is a special level that can be used to turn off logging.
This level is initialized to |
resourceBundleName | back to summary |
---|---|
private final String resourceBundleName |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID
|
SEVERE | back to summary |
---|---|
public static final Level SEVERE SEVERE is a message level indicating a serious failure.
In general SEVERE messages should describe events that are
of considerable importance and which will prevent normal
program execution. They should be reasonably intelligible
to end users and to system administrators.
This level is initialized to |
standardLevels | back to summary |
---|---|
private static final Level[] standardLevels |
value | back to summary |
---|---|
private final int value |
WARNING | back to summary |
---|---|
public static final Level WARNING WARNING is a message level indicating a potential problem.
In general WARNING messages should describe events that will
be of interest to end users or system managers, or which
indicate potential problems.
This level is initialized to |
Level | back to summary |
---|---|
protected Level(String name, int value) Create a named Level with a given integer value. Note that this constructor is "protected" to allow subclassing. In general clients of logging should use one of the constant Level objects such as SEVERE or FINEST. However, if clients need to add new logging levels, they may subclass Level and define new constants.
|
Level | back to summary |
---|---|
protected Level(String name, int value, String resourceBundleName) Create a named Level with a given integer value and a given localization resource name.
|
Level | back to summary |
---|---|
private Level(String name, int value, String resourceBundleName, boolean visible) |
computeLocalizedLevelName | back to summary |
---|---|
private String computeLocalizedLevelName(Locale newLocale) |
equals | back to summary |
---|---|
public boolean equals(Object ox) Overrides java. Compare two objects for value equality.
|
findLevel | back to summary |
---|---|
pack-priv static Level findLevel(String name) |
getCachedLocalizedLevelName | back to summary |
---|---|
pack-priv final String getCachedLocalizedLevelName() |
getLevelName | back to summary |
---|---|
pack-priv final String getLevelName() |
getLocalizedLevelName | back to summary |
---|---|
pack-priv final synchronized String getLocalizedLevelName() |
getLocalizedName | back to summary |
---|---|
public String getLocalizedName() Return the localized string name of the Level, for the current default locale. If no localization information is available, the non-localized name is returned.
|
getName | back to summary |
---|---|
public String getName() Return the non-localized string name of the Level.
|
getResourceBundleName | back to summary |
---|---|
public String getResourceBundleName() Return the level's localization resource bundle name, or null if no localization bundle is defined.
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Generate a hashcode.
|
intValue | back to summary |
---|---|
public final int intValue() Get the integer value for this level. This integer value can be used for efficient ordering comparisons between Level objects.
|
parse | back to summary |
---|---|
public static synchronized Level parse(String name) throws IllegalArgumentException Parse a level name string into a Level. The argument string may consist of either a level name or an integer value. For example:
|
readResolve | back to summary |
---|---|
private Object readResolve() Returns a |
toString | back to summary |
---|---|
public final String toString() Overrides java. Returns a string representation of this Level. |
Modifier and Type | Field and Description |
---|---|
private static final ClassLoaderValue | |
private static Map | |
pack-priv final Level | |
private static Map | |
private static final ReferenceQueue |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
pack-priv static synchronized void | |
pack-priv static synchronized Optional | |
pack-priv static synchronized Optional | |
pack-priv static synchronized Optional | |
pack-priv static synchronized Optional | |
pack-priv Optional | |
pack-priv static synchronized void | |
pack-priv Optional | |
private static void | |
private void |
CUSTOM_LEVEL_CLV | back to summary |
---|---|
private static final ClassLoaderValue<List<Level>> CUSTOM_LEVEL_CLV |
intToLevels | back to summary |
---|---|
private static Map<Integer, List<Level. |
mirroredLevel | back to summary |
---|---|
pack-priv final Level mirroredLevel |
nameToLevels | back to summary |
---|---|
private static Map<String, List<Level. |
QUEUE | back to summary |
---|---|
private static final ReferenceQueue<Level> QUEUE |
KnownLevel | back to summary |
---|---|
pack-priv KnownLevel(Level l) |
add | back to summary |
---|---|
pack-priv static synchronized void add(Level l) |
findByLocalizedLevelName | back to summary |
---|---|
pack-priv static synchronized Optional |
findByName | back to summary |
---|---|
pack-priv static synchronized Optional |
findByValue | back to summary |
---|---|
pack-priv static synchronized Optional |
matches | back to summary |
---|---|
pack-priv static synchronized Optional |
mirrored | back to summary |
---|---|
pack-priv Optional |
purge | back to summary |
---|---|
pack-priv static synchronized void purge() |
referent | back to summary |
---|---|
pack-priv Optional |
registerWithClassLoader | back to summary |
---|---|
private static void registerWithClassLoader(Level customLevel) |
remove | back to summary |
---|---|
private void remove() |
Modifier and Type | Field and Description |
---|---|
pack-priv static final JavaUtilResourceBundleAccess |
Access | Constructor and Description |
---|---|
private |
RB_ACCESS | back to summary |
---|---|
pack-priv static final JavaUtilResourceBundleAccess RB_ACCESS |
RbAccess | back to summary |
---|---|
private RbAccess() |