Enum Level

  • All Implemented Interfaces:
    Serializable, Comparable<Level>

    public enum Level
    extends Enum<Level>
    Enumeration of the Log4j levels.
    Since:
    15.0
    Version:
    17.0 2020-01-04 14:41:57
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.bootique
    Maven Artifact Id:
    bootique-log4j
    • Enum Constant Detail

      • OFF

        public static final Level OFF
        No logging.
      • ERROR

        public static final Level ERROR
        Error.
      • WARNING

        public static final Level WARNING
        Warning.
      • INFO

        public static final Level INFO
        Information.
      • DEBUG

        public static final Level DEBUG
        Debug.
      • TRACE

        public static final Level TRACE
        Trace.
      • ALL

        public static final Level ALL
        All.
    • Method Detail

      • values

        public static Level[] 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 (Level c : Level.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Level 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
      • valueOfCaseInsensitive

        public static Level valueOfCaseInsensitive​(String name)
        Parse a case insensitive string for obtaining the level.
        Parameters:
        name - the name to parse.
        Returns:
        the level.
        Since:
        16.0
      • toJsonString

        public String toJsonString()
        Replies the preferred string representation of the level within a Json stream.
        Returns:
        the string representation of the level.
        Since:
        16.0
      • toLog4j

        public org.apache.log4j.Level toLog4j()
        Replies the log4j level.
        Returns:
        the log4j level.
      • toJul

        public Level toJul()
        Replies the JUL level.
        Returns:
        the JUL level.
        Since:
        16.0
      • valueOf

        public static Level valueOf​(org.apache.log4j.Level level)
        Replies the level that is equivalent to the given Log4J level.
        Parameters:
        level - the Log4J level.
        Returns:
        the equivalent level.
        Since:
        16.0
      • valueOf

        public static Level valueOf​(Level level)
        Replies the level that is equivalent to the given JUL level.
        Parameters:
        level - the JUL level.
        Returns:
        the equivalent level.
        Since:
        16.0
      • getLabels

        public static String getLabels()
        Replies the string representation of all the labels.
        Returns:
        all the labels.