org.apache.logging.log4j.core.config
Interface Configuration

All Superinterfaces:
Filterable
All Known Implementing Classes:
BaseConfiguration, DefaultConfiguration, JSONConfiguration, NullConfiguration, XMLConfiguration

public interface Configuration
extends Filterable

Interface that must be implemented to create a configuration.


Method Summary
 void addComponent(String name, Object object)
           
 void addListener(ConfigurationListener listener)
           
 void addLoggerAppender(Logger logger, Appender appender)
           
 void addLoggerFilter(Logger logger, Filter filter)
           
 void createConfiguration(Node node, LogEvent event)
           
 Map<String,Appender> getAppenders()
          Returns a Map containing all the Appenders and their name.
 Object getComponent(String name)
           
 ConfigurationMonitor getConfigurationMonitor()
           
 LoggerConfig getLoggerConfig(String name)
          Locates the appropriate LoggerConfig for a Logger name.
 Map<String,LoggerConfig> getLoggers()
           
 String getName()
          Returns the configuration name.
 StrSubstitutor getSubst()
           
 void removeListener(ConfigurationListener listener)
           
 void setLoggerAdditive(Logger logger, boolean additive)
           
 void start()
           
 void stop()
           
 
Methods inherited from interface org.apache.logging.log4j.core.filter.Filterable
addFilter, getFilter, hasFilter, isFiltered, removeFilter
 

Method Detail

getName

String getName()
Returns the configuration name.

Returns:
the name of the configuration.

getLoggerConfig

LoggerConfig getLoggerConfig(String name)
Locates the appropriate LoggerConfig for a Logger name. This will remove tokens from the package name as necessary or return the root LoggerConfig if no other matches were found.

Parameters:
name - The Logger name.
Returns:
The located LoggerConfig.

getAppenders

Map<String,Appender> getAppenders()
Returns a Map containing all the Appenders and their name.

Returns:
A Map containing each Appender's naem and the Appender object.

getLoggers

Map<String,LoggerConfig> getLoggers()

addLoggerAppender

void addLoggerAppender(Logger logger,
                       Appender appender)

addLoggerFilter

void addLoggerFilter(Logger logger,
                     Filter filter)

setLoggerAdditive

void setLoggerAdditive(Logger logger,
                       boolean additive)

start

void start()

stop

void stop()

addListener

void addListener(ConfigurationListener listener)

removeListener

void removeListener(ConfigurationListener listener)

getSubst

StrSubstitutor getSubst()

createConfiguration

void createConfiguration(Node node,
                         LogEvent event)

getComponent

Object getComponent(String name)

addComponent

void addComponent(String name,
                  Object object)

getConfigurationMonitor

ConfigurationMonitor getConfigurationMonitor()


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved. Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, and the Apache Logging project logo are trademarks of The Apache Software Foundation.