public enum LogLevel extends Enum<LogLevel>
ALL | = 0 | This level currently logs at the same level as FINEST. | |
FINEST | = 1 | This level enables logging of more debugging information than the FINER setting, such as a very detailed information about certain features (for example, sequencing). You may want to use this log level during debugging and testing, but not at production. | |
FINER | = 2 | This level enables logging of more debugging information than the FINE setting. For example, the transaction information is logged at this level. You may want to use this log level during debugging and testing, but not at production. | |
FINE | = 3 | This level enables logging of the first level of the debugging information and SQL. You may want to use this log level during debugging and testing, but not at production. | |
CONFIG | = 4 | This level enables logging of such configuration details as your database login information and some metadata information. You may want to use the CONFIG log level at deployment time. | |
INFO | = 5 | This level enables the standard output. The contents of this output is very limited. It is the default logging level if a logging level is not set. | |
WARNING | = 6 | This level enables logging of issues that have a potential to cause problems. For example, a setting that is picked by the application and not by the user. | |
SEVERE | = 7 | This level enables reporting of failure cases only. Usually, if the failure occurs, the application stops. | |
OFF | = 8 | This setting disables the generation of the log output. You may want to set logging to OFF during production to avoid the overhead of logging. |
Enum Constant and Description |
---|
ALL
Log everything.
|
CONFIG
Configuration information logging level.
|
FINE
Fine logging level.
|
FINER
Finer logging level.
|
FINEST
Finest (the most detailed) logging level.
|
INFO
Informational messages.
|
OFF
Logging is turned off.
|
SEVERE
Fatal exceptions.
|
WARNING
Exceptions that are not fatal.
|
Modifier and Type | Field and Description |
---|---|
static int |
length
Logging levels enumeration length.
|
Modifier and Type | Method and Description |
---|---|
byte |
getId()
Get logging level ID.
|
String |
getName()
Get logging level name.
|
boolean |
shouldLog(byte id)
Check if a message of the given level ID would actually be logged under this logging level.
|
boolean |
shouldLog(LogLevel level)
Check if a message of the given level would actually be logged under this logging level.
|
static LogLevel |
toValue(int id)
|
static LogLevel |
toValue(int id,
LogLevel fallBack)
|
static LogLevel |
toValue(String name)
|
static LogLevel |
toValue(String name,
LogLevel fallBack)
|
static LogLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LogLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LogLevel ALL
public static final LogLevel FINEST
public static final LogLevel FINER
public static final LogLevel FINE
public static final LogLevel CONFIG
public static final LogLevel INFO
public static final LogLevel WARNING
public static final LogLevel SEVERE
public static final LogLevel OFF
public static LogLevel[] values()
for (LogLevel c : LogLevel.values()) System.out.println(c);
public static LogLevel 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 static final LogLevel toValue(int id)
id
- LogLevel
ID.LogLevel
object holding the value represented by the id
argument.IllegalArgumentException
- when LogLevel
ID is out of valid LogLevel
IDs range.public static final LogLevel toValue(int id, LogLevel fallBack)
id
- LogLevel
ID.fallBack
- LogLevel
object to return on ID lookup failure.LogLevel
object holding the value represented by the id
argument or fallBack
when provided ID is not valid LogLevel
ID.IllegalArgumentException
- when LogLevel
ID is out of valid LogLevel
IDs range.public byte getId()
public String getName()
public boolean shouldLog(LogLevel level)
level
- Message logging level.true
if the given message logging level will be logged or false
otherwise.public boolean shouldLog(byte id)
id
- Message logging level.true
if the given message logging level will be logged or false
otherwise.Copyright © 2007–2020 Eclipse.org - EclipseLink Project. All rights reserved.