public class LogLevel
extends java.util.logging.Level
Modifier and Type | Field and Description |
---|---|
static java.util.logging.Level |
DEBUG
The logging level for information for debugging.
|
static java.util.logging.Level |
ERROR
The logging level indicating a serious failure.
|
static java.util.logging.Level |
INFO
The logging level for informational messages.
|
static java.util.logging.Level |
WARNING
The logging level indicating a potential problem.
|
Modifier | Constructor and Description |
---|---|
protected |
LogLevel(java.lang.String name,
int value)
Create a named logging level with a given integer value.
|
Modifier and Type | Method and Description |
---|---|
static java.util.logging.Level |
parse(java.lang.String name)
Parse a level name string into a Level.
|
public static final java.util.logging.Level ERROR
public static final java.util.logging.Level WARNING
public static final java.util.logging.Level INFO
public static final java.util.logging.Level DEBUG
protected LogLevel(java.lang.String name, int value)
Note that this constructor is "protected" to allow subclassing. In general clients of logging
should use one of the constant LogLevel
objects such as INFO
or DEBUG
.
However, if clients need to add new logging levels, they may subclass LogLevel
and
define new constants.
name
- the name of the level, for example NEW_LEVEL
value
- an integer value for the leveljava.lang.NullPointerException
- if the name is null
public static java.util.logging.Level parse(java.lang.String name) throws java.lang.IllegalArgumentException
The argument string may consist of either a level name or an integer value.
For example:
ERROR
;
1000
;
name
- string to be parsedCONFIG
). Passing an integer that does not
(e.g., 1) will return a new level name initialised to that valuejava.lang.NullPointerException
- if the name is null
java.lang.IllegalArgumentException
- if the value is not valid. Valid values are integers between
Integer.MIN_VALUE
and Integer.MAX_VALUE
, and all known level names.
Known names are:
ERROR
and WARNING
);
Level
class (for example, SEVERE
and
FINE
); levels created by these classes with appropriate package access;