- All Implemented Interfaces:
Serializable
,Comparable<LoggingType>
,Constable
,Iterable<org.apache.logging.log4j.Level>
public enum LoggingType
extends Enum<LoggingType>
implements Iterable<org.apache.logging.log4j.Level>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Level[]
Supported console logging levels.private static final org.apache.logging.log4j.Level[]
Supported file logging levels. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate @NotNull Iterator
<org.apache.logging.log4j.Level> createIterator
(org.apache.logging.log4j.Level @NotNull [] levels) Creates an iterator for the given levels.org.apache.logging.log4j.Level @NotNull []
Gets the allowed levels for this logging type.@NotNull Iterator
<org.apache.logging.log4j.Level> iterator()
@NotNull String
toString()
static LoggingType
Returns the enum constant of this class with the specified name.static LoggingType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Enum Constant Details
-
CONSOLE
The logging will be printed to the console. -
FILE
The logging will be printed to a file.
-
-
Field Details
-
CONSOLE_LEVELS
private static final org.apache.logging.log4j.Level[] CONSOLE_LEVELSSupported console logging levels. -
FILE_LEVELS
private static final org.apache.logging.log4j.Level[] FILE_LEVELSSupported file logging levels.
-
-
Constructor Details
-
LoggingType
private LoggingType()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getAllowedLevels
public org.apache.logging.log4j.Level @NotNull [] getAllowedLevels()Gets the allowed levels for this logging type.- Returns:
- An array of allowed levels
- Throws:
IllegalStateException
- If the logging type is unknown
-
iterator
-
createIterator
@NotNull private @NotNull Iterator<org.apache.logging.log4j.Level> createIterator(org.apache.logging.log4j.Level @NotNull [] levels) Creates an iterator for the given levels.- Parameters:
levels
- The levels- Returns:
- The created iterator
-
toString
- Overrides:
toString
in classEnum<LoggingType>
-