T - The BuiltConfiguration type.public class DefaultConfigurationBuilder<T extends BuiltConfiguration> extends Object implements ConfigurationBuilder<T>
| Constructor and Description |
|---|
DefaultConfigurationBuilder() |
DefaultConfigurationBuilder(Class<T> clazz) |
| Modifier and Type | Method and Description |
|---|---|
ConfigurationBuilder<T> |
add(AppenderComponentBuilder builder)
Adds an AppenderComponent.
|
protected ConfigurationBuilder<T> |
add(Component parent,
ComponentBuilder<?> builder) |
ConfigurationBuilder<T> |
add(CustomLevelComponentBuilder builder)
Adds a CustomLevel component.
|
ConfigurationBuilder<T> |
add(FilterComponentBuilder builder)
Adds a Filter component.
|
ConfigurationBuilder<T> |
add(LoggerComponentBuilder builder)
Adds a Logger component.
|
ConfigurationBuilder<T> |
add(RootLoggerComponentBuilder builder)
Adds the root Logger component.
|
ConfigurationBuilder<T> |
addProperty(String key,
String value)
Adds a Property key and value.
|
T |
build()
Builds the object after all configuration has been set.
|
AppenderComponentBuilder |
newAppender(String name,
String type)
Returns a builder for creating Appenders.
|
AppenderRefComponentBuilder |
newAppenderRef(String ref)
Returns a builder for creating AppenderRefs.
|
LoggerComponentBuilder |
newAsyncLogger(String name,
Level level)
Returns a builder for creating Async Loggers.
|
LoggerComponentBuilder |
newAsyncLogger(String name,
String level)
Returns a builder for creating Async Loggers.
|
RootLoggerComponentBuilder |
newAsyncRootLogger(Level level)
Returns a builder for creating the async root Logger.
|
RootLoggerComponentBuilder |
newAsyncRootLogger(String level)
Returns a builder for creating the async root Logger.
|
<B extends ComponentBuilder<B>> |
newComponent(String name,
String type)
Returns a builder for creating generic components.
|
<B extends ComponentBuilder<B>> |
newComponent(String name,
String type,
String value)
Returns a builder for creating generic components.
|
CustomLevelComponentBuilder |
newCustomLevel(String name,
int level)
Returns a builder for creating CustomLevels
|
FilterComponentBuilder |
newFilter(String type,
Filter.Result onMatch,
Filter.Result onMisMatch)
Returns a builder for creating Filters.
|
FilterComponentBuilder |
newFilter(String type,
String onMatch,
String onMisMatch)
Returns a builder for creating Filters.
|
LayoutComponentBuilder |
newLayout(String type)
Returns a builder for creating Layouts.
|
LoggerComponentBuilder |
newLogger(String name,
Level level)
Returns a builder for creating Loggers.
|
LoggerComponentBuilder |
newLogger(String name,
String level)
Returns a builder for creating Loggers.
|
RootLoggerComponentBuilder |
newRootLogger(Level level)
Returns a builder for creating the root Logger.
|
RootLoggerComponentBuilder |
newRootLogger(String level)
Returns a builder for creating the root Logger.
|
ConfigurationBuilder<T> |
setAdvertiser(String advertiser)
Set the Advertiser Plugin name.
|
ConfigurationBuilder<T> |
setConfigurationName(String name)
Set the name of the configuration.
|
ConfigurationBuilder<T> |
setConfigurationSource(ConfigurationSource configurationSource)
Set the ConfigurationSource.
|
ConfigurationBuilder<T> |
setMonitorInterval(String intervalSeconds)
Sets the interval at which the configuration file should be checked for changes.
|
ConfigurationBuilder<T> |
setPackages(String packages)
Sets the list of packages to search for plugins.
|
ConfigurationBuilder<T> |
setShutdownHook(String flag)
Sets whether the shutdown hook should be disabled.
|
ConfigurationBuilder<T> |
setStatusLevel(Level level)
Sets the level of the StatusLogger.
|
ConfigurationBuilder<T> |
setVerbosity(String verbosity)
Sets whether the logging should include constructing Plugins.
|
protected ConfigurationBuilder<T> add(Component parent, ComponentBuilder<?> builder)
public ConfigurationBuilder<T> add(AppenderComponentBuilder builder)
ConfigurationBuilderadd in interface ConfigurationBuilder<T extends BuiltConfiguration>builder - The AppenderComponentBuilder with all of its attributes and sub components set.public ConfigurationBuilder<T> add(CustomLevelComponentBuilder builder)
ConfigurationBuilderadd in interface ConfigurationBuilder<T extends BuiltConfiguration>builder - The CustomLevelComponentBuilder with all of its attributes set.public ConfigurationBuilder<T> add(FilterComponentBuilder builder)
ConfigurationBuilderadd in interface ConfigurationBuilder<T extends BuiltConfiguration>builder - the FilterComponentBuilder with all of its attributes and sub components set.public ConfigurationBuilder<T> add(LoggerComponentBuilder builder)
ConfigurationBuilderadd in interface ConfigurationBuilder<T extends BuiltConfiguration>builder - The LoggerComponentBuilder with all of its attributes and sub components set.public ConfigurationBuilder<T> add(RootLoggerComponentBuilder builder)
ConfigurationBuilderadd in interface ConfigurationBuilder<T extends BuiltConfiguration>builder - The RootLoggerComponentBuilder with all of its attributes and sub components set.public ConfigurationBuilder<T> addProperty(String key, String value)
ConfigurationBuilderaddProperty in interface ConfigurationBuilder<T extends BuiltConfiguration>key - The property key.value - The property value.public T build()
Builderbuild in interface Builder<T extends BuiltConfiguration>public AppenderComponentBuilder newAppender(String name, String type)
ConfigurationBuildernewAppender in interface ConfigurationBuilder<T extends BuiltConfiguration>name - The name of the Appender.type - The Plugin type of the Appender.public AppenderRefComponentBuilder newAppenderRef(String ref)
ConfigurationBuildernewAppenderRef in interface ConfigurationBuilder<T extends BuiltConfiguration>ref - The name of the Appender being referenced.public LoggerComponentBuilder newAsyncLogger(String name, Level level)
ConfigurationBuildernewAsyncLogger in interface ConfigurationBuilder<T extends BuiltConfiguration>name - The name of the Logger.level - The logging Level to be assigned to the Logger.public LoggerComponentBuilder newAsyncLogger(String name, String level)
ConfigurationBuildernewAsyncLogger in interface ConfigurationBuilder<T extends BuiltConfiguration>name - The name of the Logger.level - The logging Level to be assigned to the Logger.public RootLoggerComponentBuilder newAsyncRootLogger(Level level)
ConfigurationBuildernewAsyncRootLogger in interface ConfigurationBuilder<T extends BuiltConfiguration>level - The logging Level to be assigned to the root Logger.public RootLoggerComponentBuilder newAsyncRootLogger(String level)
ConfigurationBuildernewAsyncRootLogger in interface ConfigurationBuilder<T extends BuiltConfiguration>level - The logging Level to be assigned to the root Logger.public <B extends ComponentBuilder<B>> ComponentBuilder<B> newComponent(String name, String type)
ConfigurationBuildernewComponent in interface ConfigurationBuilder<T extends BuiltConfiguration>B - ComponentBuilder target typename - The name of the component (may be null).type - The Plugin type of the component.public <B extends ComponentBuilder<B>> ComponentBuilder<B> newComponent(String name, String type, String value)
ConfigurationBuildernewComponent in interface ConfigurationBuilder<T extends BuiltConfiguration>B - ComponentBuilder target typename - The name of the component (may be null).type - The Plugin type of the component.value - The value of the component.public CustomLevelComponentBuilder newCustomLevel(String name, int level)
ConfigurationBuildernewCustomLevel in interface ConfigurationBuilder<T extends BuiltConfiguration>name - The name of the custom level.level - The integer value to be assigned to the level.public FilterComponentBuilder newFilter(String type, Filter.Result onMatch, Filter.Result onMisMatch)
ConfigurationBuildernewFilter in interface ConfigurationBuilder<T extends BuiltConfiguration>type - The Plugin type of the Filter.onMatch - "ACCEPT", "DENY", or "NEUTRAL"onMisMatch - "ACCEPT", "DENY", or "NEUTRAL"public FilterComponentBuilder newFilter(String type, String onMatch, String onMisMatch)
ConfigurationBuildernewFilter in interface ConfigurationBuilder<T extends BuiltConfiguration>type - The Plugin type of the Filter.onMatch - "ACCEPT", "DENY", or "NEUTRAL"onMisMatch - "ACCEPT", "DENY", or "NEUTRAL"public LayoutComponentBuilder newLayout(String type)
ConfigurationBuildernewLayout in interface ConfigurationBuilder<T extends BuiltConfiguration>type - The Plugin type of the Layout.public LoggerComponentBuilder newLogger(String name, Level level)
ConfigurationBuildernewLogger in interface ConfigurationBuilder<T extends BuiltConfiguration>name - The name of the Logger.level - The logging Level to be assigned to the Logger.public LoggerComponentBuilder newLogger(String name, String level)
ConfigurationBuildernewLogger in interface ConfigurationBuilder<T extends BuiltConfiguration>name - The name of the Logger.level - The logging Level to be assigned to the Logger.public RootLoggerComponentBuilder newRootLogger(Level level)
ConfigurationBuildernewRootLogger in interface ConfigurationBuilder<T extends BuiltConfiguration>level - The logging Level to be assigned to the root Logger.public RootLoggerComponentBuilder newRootLogger(String level)
ConfigurationBuildernewRootLogger in interface ConfigurationBuilder<T extends BuiltConfiguration>level - The logging Level to be assigned to the root Logger.public ConfigurationBuilder<T> setAdvertiser(String advertiser)
ConfigurationBuildersetAdvertiser in interface ConfigurationBuilder<T extends BuiltConfiguration>advertiser - The Advertiser Plugin name.public ConfigurationBuilder<T> setConfigurationName(String name)
setConfigurationName in interface ConfigurationBuilder<T extends BuiltConfiguration>name - the name of the Configuration. By default is "Assembled".public ConfigurationBuilder<T> setConfigurationSource(ConfigurationSource configurationSource)
setConfigurationSource in interface ConfigurationBuilder<T extends BuiltConfiguration>configurationSource - the ConfigurationSourcepublic ConfigurationBuilder<T> setMonitorInterval(String intervalSeconds)
ConfigurationBuildersetMonitorInterval in interface ConfigurationBuilder<T extends BuiltConfiguration>intervalSeconds - The number of seconds that should pass between checks of the configuration file.public ConfigurationBuilder<T> setPackages(String packages)
ConfigurationBuildersetPackages in interface ConfigurationBuilder<T extends BuiltConfiguration>packages - The comma separated list of packages.public ConfigurationBuilder<T> setShutdownHook(String flag)
ConfigurationBuildersetShutdownHook in interface ConfigurationBuilder<T extends BuiltConfiguration>flag - "disable" will prevent the shutdown hook from being set.public ConfigurationBuilder<T> setStatusLevel(Level level)
ConfigurationBuildersetStatusLevel in interface ConfigurationBuilder<T extends BuiltConfiguration>level - The logging level.public ConfigurationBuilder<T> setVerbosity(String verbosity)
ConfigurationBuildersetVerbosity in interface ConfigurationBuilder<T extends BuiltConfiguration>verbosity - "disable" will hide messages from plugin construction.Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.