Creating additional Loggers

In IBM® Security Directory Integrator, you can severe the hardwired link between IBM Security Directory Integrator and Log4J, and replace with a configurable logging class which by default invokes Log4J.

Traditionally, logging in IBM Security Directory Integrator is accomplished by means of Server- or task (AssemblyLine)-based Appenders, which rely upon the Apache Log4J framework to do the actual log output. While Log4J provides a variety of output channels and formats, there are other logging utilities with overlapping and additional output channels that you as an IBM Security Directory Integrator user may need. Many of these are open source libraries that are not bundled with IBM Security Directory Integrator for legal reasons. To enable inclusion of these 3rd party logging utilities, the IBM Security Directory Integrator logging component is modeled to act as a proxy between IBM Security Directory Integrator and the actual logging implementations, called LogInterface implementations. IBM Security Directory Integrator comes with implementations for Log4J, JLOG and java.util.log, as follows:
Table 1. LogInterface implentations for logging utilites
Logging Utility Handlers/Appenders
Apache Log4J

Category based configuration *)  
ConsoleAppender  
CustomAppender  
DailyRollingFileAppender  
FileAppender  
NTEventLog  
FileRollerAppender  
SystemLogAppender  
SyslogAppender

Standard Java™ Logging (java.util.log) FileHandler
JLOG

Category based configuration *)  
FileHandler

*) Category based configuration means that the configuration of the logger is defined in an external file specific to the logging utility such as "log4j.properties" for Log4J.

The IBM Security Directory Integrator configuration file structure accommodates a top-level folder which holds com.ibm.di.config.interfaces.LogConfigItem objects. This folder is populated by the IBM Security Directory Integrator class loader (IDILoader) scanning all JAR and .zip files for "tdi.xml" files. The "tdi.xml" files define new loggers that become available to the IBM Security Directory Integrator user/CE by including appropriate sections. Each logger defined this way will also include a form definition that the IBM Security Directory Integrator CE can present to the user for configuration of its custom logger parameters.

The com.ibm.di.log.Log class is designed to use one or more of these new log components. Each log component implements com.ibm.di.log.LogInterface. This class is responsible for mapping LogInterface methods to the corresponding methods in its logging utility framework. The log component is given the LogConfigItem object to properly configure its back end logger when it is instantiated.