How to configure log4j.properties in Tomcat 5.5 to enable different logging levels
This technote provides you with information about the configuring of log4j.properties in Tomcat 5.5 to enable different logging levels for IBM Rational Portfolio Manager.
There are two files needed to enable log4j.properties for different logging levels in Rational Portfolio Manager; log4j-1.2.8.jar and log4j.properties. A user has to ensure that the files exist in the following locations:
log4j-1.2.8.jar should be placed in %TOMCAT DIR%\shared\lib
log4j.properties should be placed in %TOMCAT DIR%\WEB-INF\Classes
Once the user has confirmed that the files are placed in the right directory, the next step would be to set values for some parameters in log4j.properties to reflect the logging level the user needs. In this technote, we will not be discussing all the parameters in the log4j.properties file, but only the ones that the user would need to enable the desired logging level. Listed below are the parameters that we will be discussing in this technote:
This parameter specifies the logging level being used. The following is a summary of different log4j log levels for Tomcat 5.5:
All is the highest level of tracing and this level will show all logging transactions.
Debug shows more detail of all the debugging levels for tracking transactions in the middleware.
Error level of logging will show events with errors and should allow the RPM application to function when this is on.
Fatal level of logging will show events that are severe enough to force the middleware application to terminate.
Info level of logging will show the events of the application server.
Trace Events level of logging will show the events of the application server with more granularity than then the DEBUG level.
Trace_INT level of logging will show the integer value of the Trace Level of logging
Warn level of logging will show all possible warnings.
This parameter specifies the location of the log4j file. It is important that double back slashes are used in the assigned value. For example, if the location of the file is d:\temp\stdout.log, the value assigned to this parameter should be written as:
This parameter specifies the maximum size of the log file. Once the log file size reaches the MaxFileSize value, a new log file will be created and it will continue to write the log to the new file.
This parameter specifies number of log files to be kept in the location specified in log4j.appender.R.File. For example, setting the log4j.appender.R.MaxBackupIndex value to 2 would mean one back up log4j log file and one active log4j log file in the log4j.appender.R.File directory.
More support for:
Rational Portfolio Manager
Installation and Configuration: Middleware
Software version: 18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, 7.1, 18.104.22.168, 22.214.171.124, 126.96.36.199
Operating system(s): AIX, HP-UX, Linux, Solaris, Windows
Reference #: 1388851
Modified date: 16 March 2011
Translate this page: