Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

log4j is not identifying ${catalina.home} in log4j.xml

843834Mar 14 2008 — edited Mar 19 2008
hi,
I am trying to print my debug statements in .log file. When i try the full path like
*<param name="File" value="*c:/Dbg/debug.log*" />* it is succsfully printing the file but if i give like
it is not printing *"${catalina.home}/Dbg/debug.log"* what is the error.

ThanQ

my log4j.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >
<log4j:configuration>
<appender name="debugfile"
		class="org.apache.log4j.RollingFileAppender">
		<param name="maxFileSize" value="100KB" />
		<param name="maxBackupIndex" value="5" />
		<param name="File" value="*${catalina.home}/Dbg/debug.log*" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern"
				value="%d{ABSOLUTE} %5p %c{1}:%L - %m%n" />
		</layout>
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="LevelMin" value="debug" />
			<param name="LevelMax" value="debug" />
		</filter>
	</appender>
<root>
		<priority value="debug"></priority>
		<appender-ref ref="debugfile" />
	</root>
</log4j:configuration>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2008
Added on Mar 14 2008
5 comments
1,043 views