Configuring the Rational DOORS database server logging file

In Rational DOORS 9.4 you can have better control over your server side logging files.

You can set limits on the size of log files, set up automatic cleanup of old files, choose the format of output log files, change the log level and change these log configurations without restarting the server. This configuration files are being monitored at interval of 60 seconds and any made to this file will reflect within this time.

The Rational DOORS server continue supports older style of logging which can be enabled by using command line switches -logfile (-l) (Refer to command line switches for Rational DOORS database server.

The information that is to be logged in the log files is controlled by the XML based configuration file, sample file 'logging-config.xml' is located by default under DOORS root path (i.e. C:\Program Files\IBM\Rational\DOORS\9.4)., the config file path should be provided in registry entry logxconfig under DOORS_Server or using command line option ‘-x’ or ‘-logxconfig’ followed by configuration file path.

The sample logging-config xml file must be configured to include a valid folder location path to generate the log files to.

For example:

<param name="file" value="${LOG_FOLDER_LOCATION}/IBM/DOORS/log/SystemError.log" /> can be changed to <param name="file" value="C:/My Server Log/IBM/DOORS/log/SystemError.log" />

Updating the logging-config.xml file

The logging-config.xml file basically contains two sections:

First section contains a list of appenders which provides settings on log file path, log level, max file size, max backup index & format for each of the log file.

There are 5 log modes FATAL < ERROR < WARN < INFO < DEBUG (Information logged for each log level will be all information which is of same or less priority logged information).

Second section logger which provides the settings on overall logging mode and set of appenders to be enabled for logging.

To disable logging set the priority level to value "off".

Following table describes the parameters used in logging -config.xml file:

Section Name Parameter Name Description Value
Appender Section Parameters      
  appender name This is name of the appender which will be used later to describe which all appenders are enabled. Anything. Ex : SystemOutAppender
  file Log file is created at the specified file name and under location mentioned in this parameter value. Accessible location in your system.
  append true: append to file mentioned in file parameter. false : overwrites the file mentioned in file parameter true/false
  Threshold This parameter sets the log mode. off, fatal, error, warn, info, debug
    If threshold is set to fatal, It logs only fatal information in log file.  
    If threshold is set to error, It logs only fatal & error information in log file  
    If threshold is set to warn, It logs only fatal, error & warn information in log file  
    If threshold is set to info, It logs fatal, error, warn & info in log file  
    If threshold is set to debug It logs all information i.e. fatal, error, warn, info & debug Information  
    If threshold is set to off logging will be disabled  
  MaxFileSize This parameter sets the maximum Size of the log file and after the log file reaches this limit it creates a new log file with filename appending the incremental number Anything with unit. Ex: 1000KB
  MaxBackupIndex This parameter sets the maximum number of files created for the logger and after it reaches it will roll back to the oldest file and start overwriting in that file Any integer
  Conversion Pattern This parameter specifies the format in which information is logged into the log file. %d{dd MMM yyyy HH:mm:ss:SSS} [%p] %m%n : Starts with date
    It basically includes date time format along with that it displays the type of log [log mode] & summary of the information logged. You can change sequence depending on how you would like to see the logs. [%p] %m%n %d{dd MMM yyyy HH:mm:ss:SSS} : starts with log mode
logger section parameters      
  priority This will set the logging mode level for overall logging. To disable logging set this parameter value to "off" off, fatal, error, warn, info, debug
  appender-ref Value for ref contains the name of appenders that you defined in appender sections above. Depending on what all appenders defined above need to be enabled for logging you need to provide those appender names <appender-ref ref="DOORSConsoleAppender"/>
    To enable multiple appenders create multiple instances of <appender-ref> tag. <appender-ref ref="SystemOutAppender"/>

Feedback