Top Description Fields Constructors Methods
org.eclipse.persistence.logging

public final Enum LogLevel

extends Enum<LogLevel>
Class Inheritance
Imports
java.util.HashMap, .Map

Log levels for EclipseLink logging. The EclipseLink logging levels available are:
Logging levels
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.

Field Summary

Modifier and TypeField and Description
public static final LogLevel
ALL

Log everything.

public static final LogLevel
CONFIG

Configuration information logging level.

public static final LogLevel
FINE

Fine logging level.

public static final LogLevel
FINER

Finer logging level.

public static final LogLevel
FINEST

Finest (the most detailed) logging level.

private final byte
id

Logging level ID. Continuous integer sequence starting from 0.

private static final LogLevel[]
idValues

Array for id to LogLevel lookup.

public static final LogLevel
INFO

Informational messages.

public static final int
length

Logging levels enumeration length.

private final String
name

Hides java.lang.Enum.name.

Logging level name.
public static final LogLevel
OFF

Logging is turned off.

public static final LogLevel
SEVERE

Fatal exceptions.

private static final Map<String, LogLevel>
stringValuesMap

Map for String to LogLevel case insensitive lookup.

public static final LogLevel
WARNING

Exceptions that are not fatal.

Constructor Summary

AccessConstructor and Description
private
LogLevel(final byte
Logging level ID.
id
,
final String
Logging level name.
name
)

Creates an instance of logging level.

Method Summary

Modifier and TypeMethod and Description
public byte

Returns:

Logging level ID.
getId
()

Get logging level ID.

public String

Returns:

Logging level name.
getName
()

Get logging level name.

public boolean

Returns:

Value of true if the given message logging level will be logged or false otherwise.
shouldLog
(final LogLevel
Message logging level.
level
)

Check if a message of the given level would actually be logged under this logging level.

public boolean

Returns:

Value of true if the given message logging level will be logged or false otherwise.
shouldLog
(final byte
Message logging level.
id
)

Check if a message of the given level ID would actually be logged under this logging level.

public static LogLevel

Returns:

LogLevel object holding the value represented by the string argument or null when there exists no corresponding LogLevel object to provided argument value.
toValue
(final String
The String to be parsed.
name
)

Returns LogLevel object holding the value of the specified String.

public static LogLevel

Returns:

LogLevel object holding the value represented by the string argument or fallBack when there exists no corresponding LogLevel object to provided argument value.
toValue
(final String
The String to be parsed.
name
,
final LogLevel
LogLevel object to return on ID lookup failure.
fallBack
)

Returns LogLevel object holding the value of the specified String.

public static LogLevel

Returns:

LogLevel object holding the value represented by the id argument.
toValue
(final int id)

Returns LogLevel object holding the value of the specified LogLevel ID.

public static LogLevel

Returns:

LogLevel object holding the value represented by the id argument or fallBack when provided ID is not valid LogLevel ID.
toValue
(final int id, final LogLevel
LogLevel object to return on ID lookup failure.
fallBack
)

Returns LogLevel object holding the value of the specified LogLevel ID.

public static LogLevel
public static LogLevel[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ALLback to summary
public static final LogLevel ALL

Log everything.

CONFIGback to summary
public static final LogLevel CONFIG

Configuration information logging level.

FINEback to summary
public static final LogLevel FINE

Fine logging level.

FINERback to summary
public static final LogLevel FINER

Finer logging level.

FINESTback to summary
public static final LogLevel FINEST

Finest (the most detailed) logging level.

idback to summary
private final byte id

Logging level ID. Continuous integer sequence starting from 0.

idValuesback to summary
private static final LogLevel[] idValues

Array for id to LogLevel lookup.

INFOback to summary
public static final LogLevel INFO

Informational messages.

lengthback to summary
public static final int length

Logging levels enumeration length.

nameback to summary
private final String name

Hides java.lang.Enum.name.

Logging level name.

OFFback to summary
public static final LogLevel OFF

Logging is turned off.

SEVEREback to summary
public static final LogLevel SEVERE

Fatal exceptions.

stringValuesMapback to summary
private static final Map<String, LogLevel> stringValuesMap

Map for String to LogLevel case insensitive lookup.

WARNINGback to summary
public static final LogLevel WARNING

Exceptions that are not fatal.

Constructor Detail

LogLevelback to summary
private LogLevel(final byte id, final String name)

Creates an instance of logging level.

Parameters
id:byte

Logging level ID.

name:String

Logging level name.

Method Detail

getIdback to summary
public byte getId()

Get logging level ID.

Returns:byte

Logging level ID.

getNameback to summary
public String getName()

Get logging level name.

Returns:String

Logging level name.

shouldLogback to summary
public boolean shouldLog(final LogLevel level)

Check if a message of the given level would actually be logged under this logging level.

Parameters
level:LogLevel

Message logging level.

Returns:boolean

Value of true if the given message logging level will be logged or false otherwise.

shouldLogback to summary
public boolean shouldLog(final byte id)

Check if a message of the given level ID would actually be logged under this logging level.

Parameters
id:byte

Message logging level.

Returns:boolean

Value of true if the given message logging level will be logged or false otherwise.

toValueback to summary
public static LogLevel toValue(final String name)

Returns LogLevel object holding the value of the specified String.

Parameters
name:String

The String to be parsed.

Returns:LogLevel

LogLevel object holding the value represented by the string argument or null when there exists no corresponding LogLevel object to provided argument value.

toValueback to summary
public static LogLevel toValue(final String name, final LogLevel fallBack)

Returns LogLevel object holding the value of the specified String.

Parameters
name:String

The String to be parsed.

fallBack:LogLevel

LogLevel object to return on ID lookup failure.

Returns:LogLevel

LogLevel object holding the value represented by the string argument or fallBack when there exists no corresponding LogLevel object to provided argument value.

toValueback to summary
public static LogLevel toValue(final int id)

Returns LogLevel object holding the value of the specified LogLevel ID.

Parameters
id:int

LogLevel ID.

Returns:LogLevel

LogLevel object holding the value represented by the id argument.

Exceptions
IllegalArgumentException:
when LogLevel ID is out of valid LogLevel IDs range.
toValueback to summary
public static LogLevel toValue(final int id, final LogLevel fallBack)

Returns LogLevel object holding the value of the specified LogLevel ID.

Parameters
id:int

LogLevel ID.

fallBack:LogLevel

LogLevel object to return on ID lookup failure.

Returns:LogLevel

LogLevel object holding the value represented by the id argument or fallBack when provided ID is not valid LogLevel ID.

Exceptions
IllegalArgumentException:
when LogLevel ID is out of valid LogLevel IDs range.
valueOfback to summary
public static LogLevel valueOf(String name)
valuesback to summary
public static LogLevel[] values()