Class PluginBuilder
- java.lang.Object
-
- org.apache.logging.log4j.core.config.plugins.util.PluginBuilder
-
-
Constructor Summary
Constructors Constructor Description PluginBuilder(PluginType<?> pluginType)
Constructs a PluginBuilder for a given PluginType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
build()
Builds the plugin object.PluginBuilder
forLogEvent(LogEvent event)
Specifies the LogEvent that may be used to provide extra context for string substitutions.PluginBuilder
withConfiguration(Configuration configuration)
Specifies the Configuration to use for constructing the plugin instance.PluginBuilder
withConfigurationNode(Node node)
Specifies the Node corresponding to the plugin object that will be created.
-
-
-
Constructor Detail
-
PluginBuilder
public PluginBuilder(PluginType<?> pluginType)
Constructs a PluginBuilder for a given PluginType.- Parameters:
pluginType
- type of plugin to configure
-
-
Method Detail
-
withConfiguration
public PluginBuilder withConfiguration(Configuration configuration)
Specifies the Configuration to use for constructing the plugin instance.- Parameters:
configuration
- the configuration to use.- Returns:
this
-
withConfigurationNode
public PluginBuilder withConfigurationNode(Node node)
Specifies the Node corresponding to the plugin object that will be created.- Parameters:
node
- the plugin configuration node to use.- Returns:
this
-
forLogEvent
public PluginBuilder forLogEvent(LogEvent event)
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
-
-