java.lang.Object
java.lang.Enum<LogLevel>
org.eclipse.persistence.logging.LogLevel
All Implemented Interfaces:
Serializable, Comparable<LogLevel>, java.lang.constant.Constable

public enum LogLevel extends Enum<LogLevel>
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.
  • Enum Constant Details

    • 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.
  • Field Details

    • length

      public static final int length
      Logging levels enumeration length.
  • Method Details

    • values

      public static LogLevel[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static LogLevel valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • toValue

      public static LogLevel toValue(String name)
      Returns LogLevel object holding the value of the specified String.
      Parameters:
      name - The String to be parsed.
      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

      public static LogLevel toValue(String name, LogLevel fallBack)
      Returns LogLevel object holding the value of the specified String.
      Parameters:
      name - The String to be parsed.
      fallBack - LogLevel object to return on ID lookup failure.
      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

      public static LogLevel toValue(int id)
      Returns LogLevel object holding the value of the specified LogLevel ID.
      Parameters:
      id - LogLevel ID.
      Returns:
      LogLevel object holding the value represented by the id argument.
      Throws:
      IllegalArgumentException - when LogLevel ID is out of valid LogLevel IDs range.
    • toValue

      public static LogLevel toValue(int id, LogLevel fallBack)
      Returns LogLevel object holding the value of the specified LogLevel ID.
      Parameters:
      id - LogLevel ID.
      fallBack - LogLevel object to return on ID lookup failure.
      Returns:
      LogLevel object holding the value represented by the id argument or fallBack when provided ID is not valid LogLevel ID.
      Throws:
      IllegalArgumentException - when LogLevel ID is out of valid LogLevel IDs range.
    • getId

      public byte getId()
      Get logging level ID.
      Returns:
      Logging level ID.
    • getName

      public 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 true if the given message logging level will be logged or false otherwise.
    • 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 true if the given message logging level will be logged or false otherwise.