Enum LogLevel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<LogLevel>

    public enum LogLevel
    extends java.lang.Enum<LogLevel>
    Enum which represent logging levels used in Azure SDKs.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ERROR
      Indicates that log level is at error level.
      INFORMATIONAL
      Indicates that log level is at information level.
      NOT_SET
      Indicates that no log level is set.
      VERBOSE
      Indicates that log level is at verbose level.
      WARNING
      Indicates that log level is at warning level.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static LogLevel fromString​(java.lang.String logLevelVal)
      Converts the passed log level string to the corresponding LogLevel.
      int getLogLevel()
      Converts the log level into a numeric representation used for comparisons.
      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

      • 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​(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
      • 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​(java.lang.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:
        java.lang.IllegalArgumentException - if the log level value is invalid.