Jake, Thank you very much. Actually I'm using similar configuration, but using properties file instead of xml. Here are the properties I have configured.
log4j.appender.A2=org.apache.log4j.RollingFileAppender log4j.appender.A2.file=../logs/logfile.log log4j.appender.A2.append=true log4j.appender.A2.MaxFileSize=100KB log4j.appender.A2.MaxBackupIndex=1 I appreciate any more suggestions. Thanks Vijaya -----Original Message----- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 2:49 PM To: Log4J Users List Subject: Re: File is not getting created in log4j v1.3 Quoting "Boddapati, Vijaya" <[EMAIL PROTECTED]>: > Hi > I could successfully write the logging messages to a file when I used > log4j v.1.2.12. But when I'm trying to use v1.3 and the appender as > RollingFileAppender, log file is not getting created. Am I missing > anything regarding the configuration? > Here's an example of RollingFileAppender configuration for Log4j-1.3 (examples below far for configuring Tomcat logging for "localhost" host and "mywebapp" servlet context logging)... <appender name="LOCALHOST" class="org.apache.log4j.rolling.RollingFileAppender"> <rollingPolicy class="org.apache.log4j.rolling.FixedWindowRollingPolicy"> <param name="activeFileName" value="${catalina.base}/logs/localhost.log"/> <param name="fileNamePattern" value="${catalina.base}/logs/localhost.log.%i"/> </rollingPolicy> <triggeringPolicy class="org.apache.log4j.rolling.SizeBasedTriggeringPolicy"> <param name="maxFileSize" value="30000"/> </triggeringPolicy> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p[%-8.8t]: %39.39c %-6r - %m%n"/> </layout> </appender> OR <appender name="MYWEBAPP" class="org.apache.log4j.rolling.RollingFileAppender"> <param name="Append" value="true"/> <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> <param name="activeFileName" value="${catalina.base}/logs/localhost_mywebapp.log"/> <param name="fileNamePattern" value="${catalina.base}/logs/localhost_mywebapp.log.%d"/> </rollingPolicy> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%c{1} %-6r - %m%n"/> </layout> </appender> Jake > Thanks > Vijaya > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message. Please notify the sender by E-Mail at the address shown. Thank you for your compliance. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
