Class CustomLevelConfig
java.lang.Object
org.apache.logging.log4j.core.config.CustomLevelConfig
@Plugin(name="CustomLevel",
category="Core",
printObject=true)
public final class CustomLevelConfig
extends Object
Descriptor of a custom Level object that is created via configuration.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final CustomLevelConfig[]
The empty array.private final int
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomLevelConfig
createLevel
(String levelName, int intLevel) Creates a CustomLevelConfig object.boolean
int
Returns the custom level intLevel that determines the strength of the custom level relative to the built-in levels.Returns the custom level name.int
hashCode()
toString()
-
Field Details
-
EMPTY_ARRAY
The empty array. -
levelName
-
intLevel
private final int intLevel
-
-
Constructor Details
-
CustomLevelConfig
-
-
Method Details
-
createLevel
@PluginFactory public static CustomLevelConfig createLevel(@PluginAttribute("name") String levelName, @PluginAttribute("intLevel") int intLevel) Creates a CustomLevelConfig object. This also defines the Level object with a call toLevel.forName(String, int)
.- Parameters:
levelName
- name of the custom level.intLevel
- the intLevel that determines where this level resides relative to the built-in levels- Returns:
- A CustomLevelConfig object.
-
getLevelName
Returns the custom level name.- Returns:
- the custom level name
-
getIntLevel
public int getIntLevel()Returns the custom level intLevel that determines the strength of the custom level relative to the built-in levels.- Returns:
- the custom level intLevel
-
hashCode
public int hashCode() -
equals
-
toString
-