Class PluginBuilder
java.lang.Object
org.apache.logging.log4j.core.config.plugins.util.PluginBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionPluginBuilder(PluginType<?> pluginType) Constructs a PluginBuilder for a given PluginType. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the plugin object.forLogEvent(LogEvent event) Specifies the LogEvent that may be used to provide extra context for string substitutions.static booleanvalidateFields(Builder<?> builder, String errorPrefix) withConfiguration(Configuration configuration) Specifies the Configuration to use for constructing the plugin instance.withConfigurationNode(Node node) Specifies the Node corresponding to the plugin object that will be created.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
getErrorPrefix, isValid
-
Constructor Details
-
PluginBuilder
Constructs a PluginBuilder for a given PluginType.- Parameters:
pluginType- type of plugin to configure
-
-
Method Details
-
withConfiguration
Specifies the Configuration to use for constructing the plugin instance.- Parameters:
configuration- the configuration to use.- Returns:
this
-
withConfigurationNode
Specifies the Node corresponding to the plugin object that will be created.- Parameters:
node- the plugin configuration node to use.- Returns:
this
-
forLogEvent
Specifies the LogEvent that may be used to provide extra context for string substitutions.- Parameters:
event- the event to use for extra information.- Returns:
this
-
build
-
validateFields
-