public class SimpleLogKitManager extends org.apache.avalon.framework.logger.AbstractLogEnabled implements LoggerManager, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable
LoggerManager that supports the old <logs version="1.0"/>
style logging configuration from
Phoenix.| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
DEFAULT_FORMAT |
private java.io.File |
m_baseDirectory |
private org.apache.log.Hierarchy |
m_hierarchy
Hierarchy of Application logging
|
private org.apache.avalon.framework.logger.Logger |
m_logger
The root logger wrapped using AValons Logging Facade.
|
private org.apache.log.Logger |
m_logkitLogger
The root logger in hierarchy.
|
private java.util.Collection |
m_targets |
ROLE| Constructor and Description |
|---|
SimpleLogKitManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Interpret configuration to build loggers.
|
private void |
configureCategories(org.apache.avalon.framework.configuration.Configuration[] categories,
java.util.HashMap targets)
Configure Logging categories.
|
private java.util.HashMap |
configureTargets(org.apache.avalon.framework.configuration.Configuration[] targets)
Configure a set of logtargets based on config data.
|
void |
contextualize(org.apache.avalon.framework.context.Context context)
Contextualize the manager.
|
void |
dispose()
Close any closable log targets opened by LoggerManager.
|
org.apache.avalon.framework.logger.Logger |
getDefaultLogger()
Retrieve the root logger.
|
org.apache.avalon.framework.logger.Logger |
getLoggerForCategory(java.lang.String name)
Retrieve a logger by name.
|
private static final java.lang.String DEFAULT_FORMAT
private java.io.File m_baseDirectory
private final org.apache.log.Hierarchy m_hierarchy
private final org.apache.log.Logger m_logkitLogger
private org.apache.avalon.framework.logger.Logger m_logger
private java.util.Collection m_targets
public void contextualize(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
contextualize in interface org.apache.avalon.framework.context.Contextualizablecontext - the contextorg.apache.avalon.framework.context.ContextException - if missing context entrypublic void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfiguration - the configurationorg.apache.avalon.framework.configuration.ConfigurationException - if malformed configurationpublic void dispose()
dispose in interface org.apache.avalon.framework.activity.Disposablepublic org.apache.avalon.framework.logger.Logger getLoggerForCategory(java.lang.String name)
getLoggerForCategory in interface LoggerManagername - the name of loggerpublic org.apache.avalon.framework.logger.Logger getDefaultLogger()
getDefaultLogger in interface LoggerManagerprivate java.util.HashMap configureTargets(org.apache.avalon.framework.configuration.Configuration[] targets)
throws org.apache.avalon.framework.configuration.ConfigurationException
targets - the target configuration dataorg.apache.avalon.framework.configuration.ConfigurationException - if an error occursprivate void configureCategories(org.apache.avalon.framework.configuration.Configuration[] categories,
java.util.HashMap targets)
throws org.apache.avalon.framework.configuration.ConfigurationException
categories - configuration data for categoriestargets - a hashmap containing the already existing taregtorg.apache.avalon.framework.configuration.ConfigurationException - if an error occurs