Enum 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
      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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int length
      Logging levels enumeration length.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte getId()
      Get logging level ID.
      java.lang.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)
      Returns LogLevel object holding the value of the specified LogLevel ID.
      static LogLevel toValue​(int id, LogLevel fallBack)
      Returns LogLevel object holding the value of the specified LogLevel ID.
      static LogLevel toValue​(java.lang.String name)
      Returns LogLevel object holding the value of the specified String.
      static LogLevel toValue​(java.lang.String name, LogLevel fallBack)
      Returns LogLevel object holding the value of the specified String.
      static LogLevel valueOf​(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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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.
    • Field Detail

      • length

        public static final int length
        Logging levels enumeration length.
    • 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 name
        java.lang.NullPointerException - if the argument is null
      • toValue

        public static final LogLevel toValue​(java.lang.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 final LogLevel toValue​(java.lang.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 final 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:
        java.lang.IllegalArgumentException - when LogLevel ID is out of valid LogLevel IDs range.
      • toValue

        public static final 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:
        java.lang.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 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 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.