IBM Security Directory Integrator, Version 7.2


Logging using the default Log4J class

Configuring the default logging of IBM® Security Directory Integrator, which uses Apache Log4J is done globally (using the file Log4J.properties which specifies global defaults for Server tasks) or specifically, using the Configuration Editor, for each AssemblyLine or Config File as a whole. To provide this level of flexibility and customization, the Java™ Log4J API is used.

Only the parameters that describe how messages are logged are described here.

All log configuration windows operate in the same way: For each one you can set up one or more log schemes. These are active at the same time, in addition to whatever defaults are set in the Log4J.properties file; see Log4J default parameters.

Many (but not all) loggers support a Character Encoding option, to control what character set the log files are written in. There are many different character sets; for an informal overview check http://download.oracle.com/javase/6/docs/technotes/guides/intl/encoding.doc.html.

The possible log schemes are as follows:

FileRollerAppender
Sometimes, you want to log to file but keep a limited number of files, as they can fill your disks. FileRollerAppender generates a new file for each run of the Server. The system saves only the specified number of previous logs. If your log is called mylog.txt, and you ask for 2 generations, then after 3 runs you have a mylog.txt (last run) as well as the files mylog.txt.1 and mylog.txt.2, where mylog.txt.2 is the oldest log. From this point, you do not get more files, only newer versions with the same name. Keep two generations of backup files.

FileRollerAppender has the following parameters:

File Path
The name of the file to log to. The path is relative to where you installed IBM Security Directory Integrator The special macro {0} used in filenames is replaced by the name of the Server. Similarly, {1} used in filenames is replaced by a unique identifier generated by the system for you. The {1} macro has no relevance for the special case where you use FileRollerAppender, but is important where you want unique file names.
Number of backup files
If your File Path was mylog.txt, and you select 2 backup-files, the two previous runs have their files renamed to mylog.txt.1 and mylog.txt.2 when you run a third time.
Layout
Determines the format of the log message. Options are:
  • Pattern (used if you want to customize the way the messages are logged)
  • Simple (format containing just the loglevel and the message)
  • HTML (creates an HTML file containing some (relative) time info, thread info, loglevel, category, and message)
  • XML (similar to HTML, but generates an XML file (using namespace-prefix Log4J))
Pattern
Only used when Layout is Pattern. See Creating your own log strategies.
Log level
Severity level of the log messages. Options are (from maximum to minimum information):
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL
Character Encoding
Character Encoding to be used; like Cp1252, ISO-8859-1, and so on.
Log Enabled
Click to enable the use of this Appender.
ConsoleAppender
Logs to the console (standard output). This is in the window where you started the server (ibmdisrv) or the execute task-window in the Configuration Editor (ibmditk). Console has the following parameters:
Layout
See FileRollerAppender, previous.
Pattern
See FileRollerAppender, previous.
Log level
See FileRollerAppender, previous.
Log Enabled
See FileRollerAppender, previous.
FileAppender
Logs to a file. File has the following parameters:
File Path
See FileRollerAppender, previous.
Append to file
Click to append log information to file. If option is not enabled, the file is overwritten.
Layout
See FileRollerAppender, previous.
Pattern
See FileRollerAppender, previous.
Log level
See FileRollerAppender, previous.
Character Encoding
Character Encoding to be used; like Cp1252, ISO-8859-1, and so on.
Log Enabled
See FileRollerAppender, previous.
This is the appender set up by default; see Log4J default parameters.
SyslogAppender
Enables IBM Security Directory Integrator to log on UNIX Syslog. Syslog has the following parameters:
Host name/IP Address
Host to log on to.
Syslog Facility
Legal facilities found in the drop-down. Must be supported by the host you are logging to.
Print Facility String
If set, the printed message includes the facility name of the application.
Layout
See FileRollerAppender, previous.
Pattern
See FileRollerAppender, previous.
Log level
See FileRollerAppender, previous.
Log Enabled
See FileRollerAppender, previous.
NTEventLog
Enables applications to log to the Windows NT Event Log (on Windows platforms). NTEventLog has the following parameters:
Source
The "source" name appearing in the NT event log; usually the title of the application doing the logging.
Layout
See FileRollerAppender, previous.
Pattern
See FileRollerAppender, previous.
Log level
See FileRollerAppender, previous.
Log Enabled
See FileRollerAppender, previous.
DailyRollingFileAppender
The daily rolling file appender rotates the log file every day. When the output file is rolled it is given a name consisting of the base name plus a date pattern string; that is, filename.yyyy-mm-dd. It usually is used with the Append to file parameter set to true. DailyRollingFile has the following parameters:
File Path
See FileRollerAppender, previous.
Append to file
Create new file or append to existing file, depending on whether this is checked. You usually want this on when using the DailyRollingFile.
Date Pattern
How often the file is rotated. Use the drop-down to choose resolution from minutes to months. For example, if the File Path is set to example.log and the DatePattern set to '.'yyyy-MM-dd, on 2003-10-31 at midnight, the logging file example.log is copied to example.log.2003-10-31. Logging for 2003-11-01 continues in example.log until it rolls over the next day.
Layout
See FileRollerAppender, previous.
Pattern
See FileRollerAppender, previous.
Log level
See FileRollerAppender, previous.
Character Encoding
Character Encoding to be used; like Cp1252, ISO-8859-1, and so on.
Log Enabled
See FileRollerAppender, previous.
Also see the example under Log4J default parameters.
SystemLogAppender
This Appender creates log files in a catalog hierarchy under TDI_install_dir/system_logs. For each Config File, there is a corresponding directory with logfiles named AL_xxx, where xxx is the name of the AssemblyLine being run.

This Appender has the following parameters:

Pattern
Specifies the format of the log as defined by LOG4J. The default value is:
"%d{ISO8601} %-5p [%c] - %m%n"
Additional values available in the field are:
"%d{HH:mm:ss} %p [%t] - %m%n"
"%p [%t] %c %d{HH:mm:ss,SSS} - %m%n"
Log level
See FileRollerAppender, previous.
Character Encoding
Character Encoding to be used; like Cp1252, ISO-8859-1, and so on.
Log Enabled
See FileRollerAppender, previous.


Feedback