public enum AcsLogLevelDefinition extends java.lang.Enum<AcsLogLevelDefinition>
Each item of the enumerated is composed of a name and a value,
both read directly from the IDL definition LogLevels:
There are also a number of methods to convert to/from/between the log level definitions
in IDL, XSD, and this enum.
-name comes from
-value comes from
| Enum Constant and Description |
|---|
ALERT |
CRITICAL |
DEBUG |
DELOUSE |
EMERGENCY |
ERROR |
INFO |
NOTICE |
OFF |
TRACE |
WARNING |
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
name
The name of the log (the string read from the IDL)
|
int |
value
The value of the log (the integer read from the IDL)
|
| Modifier and Type | Method and Description |
|---|---|
static alma.Logging.LoggingConfigurablePackage.LogLevels |
createIdlLogLevelsFromXsd(boolean useDefault,
UnnamedLogger xsdLevels)
Convenience method that creates the IDL-defined log level struct from
the XSD-defined levels and the default flag.
|
static UnnamedLogger |
createXsdLogLevelsFromIdl(alma.Logging.LoggingConfigurablePackage.LogLevels idlLevels) |
static AcsLogLevelDefinition |
fromInteger(int val)
Return a log level given its integer value.
|
static AcsLogLevelDefinition |
fromName(java.lang.String name)
Return a log level, given its name.
|
static AcsLogLevelDefinition |
fromXsdLogLevel(LogLevel legalLogLevel)
Helper method that converts an xsd defined log level to the matching enum literal.
|
AcsLogLevelDefinition |
getNextHigherLevel()
Use this method only for testing!
Returns the next log level in the list of enum literals, or
null
if there is no next level or the next level would be OFF. |
boolean |
isEqualXsdLevel(LogLevel schemaLevel)
Checks if an xsd-defined log level is equal to this IDL-defined level by comparing the underlying integer values.
|
LogLevel |
toXsdLevel()
Returns the
LogLevel defined in maciidl/ws/config/CDB/schemas/LoggingConfig.xsd
whose integer value matches this enum's value. |
static AcsLogLevelDefinition |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AcsLogLevelDefinition[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static LogLevel |
xsdLevelFromInteger(int level) |
public static final AcsLogLevelDefinition TRACE
public static final AcsLogLevelDefinition DELOUSE
public static final AcsLogLevelDefinition DEBUG
public static final AcsLogLevelDefinition INFO
public static final AcsLogLevelDefinition NOTICE
public static final AcsLogLevelDefinition WARNING
public static final AcsLogLevelDefinition ERROR
public static final AcsLogLevelDefinition CRITICAL
public static final AcsLogLevelDefinition ALERT
public static final AcsLogLevelDefinition EMERGENCY
public static final AcsLogLevelDefinition OFF
public final int value
public final java.lang.String name
public static AcsLogLevelDefinition[] values()
for (AcsLogLevelDefinition c : AcsLogLevelDefinition.values()) System.out.println(c);
public static AcsLogLevelDefinition valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static AcsLogLevelDefinition fromName(java.lang.String name) throws AcsJIllegalArgumentEx
This method is similar to valueOf(String) except that it throws
an Acs exception instead of a RuntimeException.
name - The (not null, not empty) name of the log levelAcsJIllegalArgumentEx - if name is null or not a valid IDL-defined log level name.public AcsLogLevelDefinition getNextHigherLevel()
null
if there is no next level or the next level would be OFF.public static AcsLogLevelDefinition fromInteger(int val) throws AcsJIllegalArgumentEx
val - The value of the log levelAcsJIllegalArgumentEx - if val did not match any AcsLogLevelDefinition.public static AcsLogLevelDefinition fromXsdLogLevel(LogLevel legalLogLevel) throws AcsJIllegalArgumentEx
AcsJIllegalArgumentExpublic LogLevel toXsdLevel()
LogLevel defined in maciidl/ws/config/CDB/schemas/LoggingConfig.xsd
whose integer value matches this enum's value.java.lang.IllegalArgumentException - if no matching Xsd-defined level can be found
(should never happen as long as IDL and XSD files are aligned)public static LogLevel xsdLevelFromInteger(int level)
throws AcsJIllegalArgumentEx
AcsJIllegalArgumentExpublic boolean isEqualXsdLevel(LogLevel schemaLevel)
java.lang.IllegalArgumentException - if schemaLevel is null.public static alma.Logging.LoggingConfigurablePackage.LogLevels createIdlLogLevelsFromXsd(boolean useDefault,
UnnamedLogger xsdLevels)
public static UnnamedLogger createXsdLogLevelsFromIdl(alma.Logging.LoggingConfigurablePackage.LogLevels idlLevels)
throws AcsJIllegalArgumentEx
AcsJIllegalArgumentEx