Logging

If you encounter errors or exceptions, you can use the log files to research the issues and find resolutions. The log file names are qm.log, ccm.log, relm.log, jts.log, admin.logvvc.log, and rs.log.

Logging in Rational Engineering Lifecycle Manager

If you are running your applications on Tomcat server, the default log file location is Install Dir/server/logs.

If you are running your applications on WebSphere® Application server, the default xx.log file location is WAS_Install_Dir/server/profiles/<profile_name>/logs.

The location of the log files is determined by the log4j.properties file in the JAZZ_HOME/xx directory. The default setting for the xx.log file is log4j.appender.logfile.File=logs/xx.log. For example, the default setting for the jts.log file is log4j.appender.file.File=logs/jts.log.

Logging and tracing are configured in the same place, a configuration file: <RelmInstallDir>/server/conf/relm/log4j.properties . This file is loaded at server start-up, or on-demand (dynamically) by invoking a special administrative operation. Subsequent to any changes, it must be reloaded for the changes to take effect.

By modifying log4j.properties you can set:
  • Log level: off, fatal, error, warning, informational, debug, trace, all. The default is WARN.
  • Log size and rotation policy
  • Which components are logged.
Refer to the Apache log4j manual for more information: http://logging.apache.org/log4j/1.2/manual.html

Loading log4j.properties dynamically

  1. Open the Rational® Engineering Lifecycle Manager administration console.
  2. As an administrator, open the Administration pull-down (gear icon) and select Application Administration > Manage Application
  3. Activate the internal tools by appending ?internal=true to the administration URL. For example: https://[relm_server]:9444/relm/admin?internal=true
  4. Select Reload Log Settings under Internal Tools.

Managing the size of the log file

By default, the size of the log file is set to 10 MB and the number of backup files are set to five in the log4j.properties file. This file is in the installdir/jazz/server/conf/jazz directory. You can change the rollover property of the log4j.properties file as needed.

To do size-based rollover, update the numeric value of the following lines:
log4j.appender.file.MaxFileSize=10MB

log4j.appender.file.MaxBackupIndex=5

These lines limit the log file size to 10 MB and the number of backup files to 5.

You can also do time-based rollover, set a date, or do daily rollover. To do a daily rollover, change log4j.appender.file=org.apache.log4j.FileAppender to log4j.appender.file=org.apache.log4j.DailyRollingFileAppender. This change rolls over the log file every midnight.

Separating trace output from logging output

By default trace information, when enabled, is sent to the same log as all other information. To redirect the trace information to another location, define an appender with the appropriate Threshold in log4.properties. For example:
log4j.appender.trace=org.apache.log4j.RollingFileAppender
log4j.appender.trace.MaxFileSize=100MB
log4j.appender.trace.Threshold=TRACE
log4j.appender.trace.MaxBackupIndex=5
log4j.appender.trace.File=logs/relm_trace.log
log4j.appender.trace.layout=org.apache.log4j.PatternLayout
log4j.appender.trace.layout.ConversionPattern=%d{ISO8601} [%30t] [%x] %5p %c  - %m%n
This would log all messages of level TRACE and higher (that is, all messages) to a file called relm_trace.log.

Feedback