Enum LogLevel

    • Enum Constant Detail

      • VERBOSE

        public static final LogLevel VERBOSE
        Indicates that log level is at verbose level.
      • INFORMATIONAL

        public static final LogLevel INFORMATIONAL
        Indicates that log level is at information level.
      • WARNING

        public static final LogLevel WARNING
        Indicates that log level is at warning level.
      • ERROR

        public static final LogLevel ERROR
        Indicates that log level is at error level.
      • NOT_SET

        public static final LogLevel NOT_SET
        Indicates that no log level is set.
    • 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​(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
      • getLogLevel

        public int getLogLevel()
        Converts the log level into a numeric representation used for comparisons.
        Returns:
        The numeric representation of the log level.
      • fromString

        public static LogLevel fromString​(String logLevelVal)
        Converts the passed log level string to the corresponding LogLevel.
        Parameters:
        logLevelVal - The log level value which needs to convert
        Returns:
        The LogLevel Enum if pass in the valid string. The valid strings for LogLevel are:
        • VERBOSE: "verbose", "debug"
        • INFO: "info", "information", "informational"
        • WARNING: "warn", "warning"
        • ERROR: "err", "error"
        Returns NOT_SET if null is passed in.
        Throws:
        IllegalArgumentException - if the log level value is invalid.