To set up enhanced logging for IBM® Engineering Requirements Management DOORS® - Web Access
(DWA)
reporting, you must create a log file and add a command to
server.start.bat.
Procedure
- Create the log4j file.
| DOORS
version |
File name |
| 9.7.2.5 and earlier |
Create a file called log4j.properties that contains the commands
similar to the following example:log4j.rootLogger=WARN, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:/DWA/translation_layer.log
log4j.appender.R.MaxFileSize=300KB
log4j.appender.R.MaxBackupIndex=5
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{ABSOLUTE} [%t] %5p %-50.50c - %m%n
log4j.logger.com.ibm.rational.doors=DEBUG
|
| 9.7.2.6 and later |
Create a file called log4j2.xml that contains the commands similar to
the following
example:<RollingFile name="reporting" filePattern="${sys:festival.home}/../logs/$${date:yyyy-MM}/reporting_translation_layer-%d{MM-dd-yyyy}-%i.log.gz">
<FileName>${sys:festival.home}/../festival/logs/reporting_translation_layer.log</FileName>
<Layout type="PatternLayout" pattern="%d{<dd-MMM-yyyy HH:mm:ss>} [%t] %-5p %c %x - %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
<DefaultRolloverStrategy max="20"/>
</RollingFile>
|
- Save the file.
| DOORS
version |
File location |
| 9.7.2.5 and earlier |
DWAInstallDir/server/lib/log4j.properties |
| 9.7.2.6 and later |
DWAInstallDir/server/lib/log4j2.xml |
Important: You must save the file in the conf directory.
- Edit the server.start.bat file.
| DOORS
version |
Updates |
| 9.7.2.5 and earlier |
Open the file and add a line like this
example:set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configuration="file:///c:/DWA/server/lib/log4j.properties"
|
| 9.7.2.6 and later |
Open the file and add a line like this
example:set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configuration="file:///c:/DWA/server/lib/log4j2.xml"
|
Important: When you add the line to the server.start.bat file, you
must make sure that you add it before the call ".\startup.bat" line.
-
Restart the DWA
server.
Results
The logging information is output to the file specified in
the log4j2.xml file. In this example, the
log file is called c:/DWA/translation_layer.log.