logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject RE: File is not getting created in log4j v1.3
Date Thu, 06 Oct 2005 21:15:30 GMT
Quoting "Boddapati, Vijaya" <Vijaya.Boddapati@ibx.com>:

> 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.
>

I see.  You'll have to wait for the next release of Log4j-1.3alpha or build from
source to do what you are doing.  The RollingFileAppender in the
org.apache.log4j package was initially removed, and that's the state of the
existing binary alpha release.  Since then, for backward compatibility, this
appender was reinstated and should be able to be configured just like in
Log4j-1.2.  The RollingFileAppender in the o.a.l.rolling package can only be
configured using the JoranConfigurator; that is, via log4j.xml, using the
examples I provided.

Jake

> 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:hoju@visi.com]
> 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" <Vijaya.Boddapati@ibx.com>:
>
> > 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: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>
> 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: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message