Package org.eclipse.persistence.logging
Enum LogLevel
- java.lang.Object
-
- java.lang.Enum<LogLevel>
-
- org.eclipse.persistence.logging.LogLevel
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<LogLevel>
public enum LogLevel extends java.lang.Enum<LogLevel>
Log levels for EclipseLink logging. The EclipseLink logging levels available are:
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 Summary
Enum Constants Enum Constant Description ALLLog everything.CONFIGConfiguration information logging level.FINEFine logging level.FINERFiner logging level.FINESTFinest (the most detailed) logging level.INFOInformational messages.OFFLogging is turned off.SEVEREFatal exceptions.WARNINGExceptions that are not fatal.
-
Field Summary
Fields Modifier and Type Field Description static intlengthLogging levels enumeration length.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description bytegetId()Get logging level ID.java.lang.StringgetName()Get logging level name.booleanshouldLog(byte id)Check if a message of the given level ID would actually be logged under this logging level.booleanshouldLog(LogLevel level)Check if a message of the given level would actually be logged under this logging level.static LogLeveltoValue(int id)static LogLeveltoValue(int id, LogLevel fallBack)static LogLeveltoValue(java.lang.String name)ReturnsLogLevelobject holding the value of the specifiedString.static LogLeveltoValue(java.lang.String name, LogLevel fallBack)ReturnsLogLevelobject holding the value of the specifiedString.static LogLevelvalueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
ALL
public static final LogLevel ALL
Log everything.
-
FINEST
public static final LogLevel FINEST
Finest (the most detailed) logging level.
-
FINER
public static final LogLevel FINER
Finer logging level.
-
FINE
public static final LogLevel FINE
Fine logging level.
-
CONFIG
public static final LogLevel CONFIG
Configuration information logging level.
-
INFO
public static final LogLevel INFO
Informational messages.
-
WARNING
public static final LogLevel WARNING
Exceptions that are not fatal.
-
SEVERE
public static final LogLevel SEVERE
Fatal exceptions.
-
OFF
public static final LogLevel OFF
Logging is turned off.
-
-
Method Detail
-
values
public static LogLevel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LogLevel c : LogLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LogLevel valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
toValue
public static final LogLevel toValue(java.lang.String name)
ReturnsLogLevelobject holding the value of the specifiedString.
-
toValue
public static final LogLevel toValue(java.lang.String name, LogLevel fallBack)
ReturnsLogLevelobject holding the value of the specifiedString.
-
toValue
public static final LogLevel toValue(int id)
-
toValue
public static final LogLevel toValue(int id, LogLevel fallBack)
- Parameters:
id-LogLevelID.fallBack-LogLevelobject to return on ID lookup failure.- Returns:
LogLevelobject holding the value represented by theidargument orfallBackwhen provided ID is not validLogLevelID.- Throws:
java.lang.IllegalArgumentException- whenLogLevelID is out of validLogLevelIDs range.
-
getId
public byte getId()
Get logging level ID.- Returns:
- Logging level ID.
-
getName
public java.lang.String getName()
Get logging level name.- Returns:
- Logging level name.
-
shouldLog
public boolean shouldLog(LogLevel level)
Check if a message of the given level would actually be logged under this logging level.- Parameters:
level- Message logging level.- Returns:
- Value of
trueif the given message logging level will be logged orfalseotherwise.
-
shouldLog
public boolean shouldLog(byte id)
Check if a message of the given level ID would actually be logged under this logging level.- Parameters:
id- Message logging level.- Returns:
- Value of
trueif the given message logging level will be logged orfalseotherwise.
-
-