Application message logging in IBM Rational DOORS

In IBM® Rational® DOORS®, you can use application messages to control diagnostic logs for troubleshooting.

Version 9.4 introduced application message logging that is based on Apache log4cxx logging services. You can limit the log file size, set up the automatic cleanup of old files, choose the format of output log files, and change the log level and the log configurations without restarting the server. The configuration file is monitored every 60 seconds to detect changes.

There are five log modes, listed here from lowest to highest: Debug, Info, Warn, Error, and Fatal. Each level will log information for that level and all higher levels. For example, the Warn level includes information from the Warn, Error, and Fatal modes.

The Rational DOORS database server still supports the earlier style of logging, which you can enable by using the -logfile command-line switch. For more information, see Command-line switches for the database server.

The information that is passed to the log files is controlled by an XML-based configuration file. Two configuration files are provided:

By default, those files are in the Rational DOORS root path; for example, C:\Program Files\IBM\Rational\DOORS\9.version.

The .xml file configuration file

The parameters that control the application message logging are in two sections of the configuration file:
  • Appender parameters provide settings for the log file path, log level, maximum file size, maximum backup index, and format for each of the log files.
  • Logger parameters provide the settings for the overall logging mode and a set of appenders that can be enabled for logging.
Table 1. Appender parameters
Name Description Value
appender name This parameter is the name of the appender that is used to describe which appenders are enabled. Anything; for example, SystemOutAppender
file This parameter value specifies the name and location of a log file that is created. An accessible location on your system; for example, C:\IBM\DOORS\log\SystemError.log
append If this parameter is set to true, information is appended to the file that is mentioned in the file parameter. If this parameter is set to false, the file that is mentioned in the file parameter is overwritten. true or false
Threshold This parameter sets the log mode. off, fatal, error, warn, info, or debug
If the threshold is set to fatal, only fatal information is logged in the log file. fatal
If the threshold is set to error, fatal and error information is logged in the log file. error
If the threshold is set to warn, fatal, error, and warning information is logged in the log file. warn
If the threshold is set to info, fatal, error, warning, and information messages are logged in the log file. info
If the threshold is set to debug, all information is logged in the log file. debug
If threshold is set to off, logging is disabled. off
MaxFileSize This parameter sets the maximum size of the log file. After the log file reaches the maximum size, another log file is created. The name of the new file includes the incremental number. Anything with a unit; for example, 1000 KB
MaxBackupIndex This parameter sets the maximum number of files that are created for the logger. After the maximum number is reached, files are overwritten, starting with the oldest file. Any integer
Conversion Pattern This parameter specifies the format in which information is logged in the log file. You can include the date and time, the log mode, and a summary of the information that is logged. You can change the sequence as needed. This value starts with the date: %d{dd MMM yyyy HH:mm:ss:SSS} [%p] %m%n
This value starts with the log mode: [%p] %m%n %d{dd MMM yyyy HH:mm:ss:SSS}
Table 2. Logger parameters
Parameter name Description Value
priority This parameter sets the logging mode level for overall logging. The default setting is equal to "all". To disable logging, set this parameter value to "off" all, debug error, fatal, info, off, or warn
appender-ref The value for ref contains the name of the appenders that you defined in the appender sections. Depending on which appenders must be enabled for logging, you must provide the appender names. <appender-ref ref="DOORSConsoleAppender"/>
To enable multiple appenders, create multiple instances of the <appender-ref> tag. <appender-ref ref="SystemOutAppender"/>
Related tasks:
Enabling transaction logging in IBM Rational DOORS

Feedback