Package com.azure.core.util.logging
Enum LogLevel
- All Implemented Interfaces:
Serializable
,Comparable<LogLevel>
,java.lang.constant.Constable
Enum which represent logging levels used in Azure SDKs.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates that log level is at error level.Indicates that log level is at information level.Indicates that no log level is set.Indicates that log level is at verbose level.Indicates that log level is at warning level. -
Method Summary
Modifier and TypeMethodDescriptionstatic LogLevel
fromString
(String logLevelVal) Converts the passed log level string to the correspondingLogLevel
.int
Converts the log level into a numeric representation used for comparisons.static LogLevel
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.
-
Enum Constant Details
-
VERBOSE
Indicates that log level is at verbose level. -
INFORMATIONAL
Indicates that log level is at information level. -
WARNING
Indicates that log level is at warning level. -
ERROR
Indicates that log level is at error level. -
NOT_SET
Indicates that no log level is set.
-
-
Method Details
-
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
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 nameNullPointerException
- 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
Converts the passed log level string to the correspondingLogLevel
.- 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"
- Throws:
IllegalArgumentException
- if the log level value is invalid.
-