public static enum System.Logger.Level extends Enum<System.Logger.Level>
A level has a name and severity.
Level values are ALL
, TRACE
, DEBUG
,
INFO
, WARNING
, ERROR
, OFF
,
by order of increasing severity.
ALL
and OFF
are simple markers with severities mapped respectively to
Integer.MIN_VALUE
and
Integer.MAX_VALUE
.
Severity values and Mapping to java.util.logging.Level
.
System logger levels are mapped to
java.util.logging levels
of corresponding severity.
The mapping is as follows:
System.Logger Levels | ALL |
TRACE |
DEBUG |
INFO |
WARNING |
ERROR |
OFF |
java.util.logging Levels | ALL |
FINER |
FINE |
INFO |
WARNING |
SEVERE |
OFF |
System.LoggerFinder
,
System.Logger
Enum Constant and Description |
---|
ALL
A marker to indicate that all levels are enabled.
|
DEBUG
DEBUG level: usually used to log debug information traces. |
ERROR
ERROR level: usually used to log error messages. |
INFO
INFO level: usually used to log information messages. |
OFF
A marker to indicate that all levels are disabled.
|
TRACE
TRACE level: usually used to log diagnostic information. |
WARNING
WARNING level: usually used to log warning messages. |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of this level.
|
int |
getSeverity()
Returns the severity of this level.
|
static System.Logger.Level |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static System.Logger.Level[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final System.Logger.Level ALL
Integer.MIN_VALUE
.public static final System.Logger.Level TRACE
public static final System.Logger.Level DEBUG
public static final System.Logger.Level INFO
public static final System.Logger.Level WARNING
public static final System.Logger.Level ERROR
public static final System.Logger.Level OFF
Integer.MAX_VALUE
.public static System.Logger.Level[] values()
for (System.Logger.Level c : System.Logger.Level.values()) System.out.println(c);
public static System.Logger.Level valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final String getName()
public final int getSeverity()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait