com.ibm.batch.container.services
Interface ILoggerConfigurationService
- All Superinterfaces:
- IBatchServiceBase
public interface ILoggerConfigurationService
- extends IBatchServiceBase
The purpose of this service is to delegate the initialization and configuration
of the Java logger used by the container to a plugin implementor.
A typical implementation should
1) Instantiate a Formatter and a Handler
2) Set the formatter and handler on loggers belonging to package names passed in
via the configureSystemLogger method.
configureSystemLogger
void configureSystemLogger(List<String> containerPackagePatterns)
- Configure the java logger.
- Parameters:
containerPackagePatterns - - A list of package names. trace/debug statements
within classes that belong under the package names declared here should be visible
in the system logs when tracing is enabled.
The plugin implementor can add additional package names for custom code written
by the plugin implementor that is not part of the core container.
E.g.
Iterator packageNames = containerPackagePatterns.iterator();
while(packageNames.hasNext()) {
String packageName = packageNames.next();
Logger logger1 = Logger.getLogger(packageName);
logger1.setLevel(_logLevel);
logger1.addHandler(_fileHandler);
}
Copyright © 2013. All Rights Reserved.