logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andre Dantas Rocha" <ad-ro...@uol.com.br>
Subject Re: DailyRollingFileAppender & DatePattern
Date Thu, 27 Jul 2006 18:10:29 GMT
Thanks James!

After put <param name="Separate" value="true" /> everthing is working. Congratulations
for your class.

André


> It actually extends FileAppender.  Are there any log4j errors in
> standard out/error?
> I forgot one thing.  Add the following to the appender config:
>     <param name="Separate" value="true" />
> 
> On 7/27/06, Andre Dantas Rocha <ad-rocha@uol.com.br> wrote:
> > Yes.
> > I think your class must extend RollingFileAppender...
> >
> >
> > > Does the log show entires from multiple minutes?
> > >
> > > On 7/27/06, Andre Dantas Rocha <ad-rocha@uol.com.br> wrote:
> > > > James,
> > > >
> > > > Only one file is created: PVT-2006-07-14-30.log
> > > >
> > > > André
> > > >
> > > >
> > > > > It doesn't take a DatePattern but that probably doesn't hurt anything.
> > > > >  What are you doing to test it and what are the results?  I have
used
> > > > > this class in production for years and it has always worked just
fine.
> > > > >
> > > > > On 7/27/06, Andre Dantas Rocha <ad-rocha@uol.com.br> wrote:
> > > > > > James,
> > > > > >
> > > > > > There is my config:
> > > > > >
> > > > > > <log4j:configuration
> > > > > >   xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
> > > > > >
> > > > > >   <appender name="DAILY" class="sps.log.log4j.DateFormatFileAppender">
> > > > > >     <param name="File" value="'PVT-'yyyy-MM-dd-HH-mm'.log'"/>
> > > > > >     <param name="DatePattern" value="yyyy-MM-dd-HH-mm"/>
> > > > > >     <layout class="org.apache.log4j.PatternLayout">
> > > > > >       <param name="ConversionPattern" value="[%p %d %t %c
- %m]\n"/>
> > > > > >     </layout>
> > > > > >   </appender>
> > > > > >
> > > > > >   <root>
> > > > > >     <priority value="DEBUG"/>
> > > > > >     <appender-ref ref="DAILY"/>
> > > > > >   </root>
> > > > > >
> > > > > > </log4j:configuration>
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > André
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > > What isn't rolling the file?  My class or the log4j class.
 What are
> > > > > > > you doing to test?
> > > > > > >
> > > > > > > On 7/27/06, Andre Dantas Rocha <ad-rocha@uol.com.br>
wrote:
> > > > > > > > James,
> > > > > > > >
> > > > > > > > Thanks for your help. Unfornutally it's not rolling
the file. Is
> > > > > > > > there a way to do this?
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > >
> > > > > > > > André
> > > > > > > >
> > > > > > > >
> > > > > > > > > I have wrote an appender that does that.
> > > > > > > > > http://stauffer.james.googlepages.com/DateFormatFileAppender.java
> > > > > > > > >
> > > > > > > > > On 7/27/06, Andre Dantas Rocha <ad-rocha@uol.com.br>
wrote:
> > > > > > > > > > Hi all,
> > > > > > > > > >
> > > > > > > > > > My current log configuration is:
> > > > > > > > > >
> > > > > > > > > > <param name="File" value="SYSTEM"/>
> > > > > > > > > > <param name="DatePattern" value="'-'dd-MM-yyyy'.log'"/>
> > > > > > > > > >
> > > > > > > > > > And the generated files:
> > > > > > > > > >
> > > > > > > > > > SYSTEM (first file)
> > > > > > > > > > SYSTEM-01-02-2006.log
> > > > > > > > > > SYSTEM-02-02-2006.log
> > > > > > > > > > SYSTEM-03-02-2006.log
> > > > > > > > > >
> > > > > > > > > > Is there a way to make the first file (SYSTEM)
follow the rolling configuration, so I would have:
> > > > > > > > > >
> > > > > > > > > > SYSTEM-01-02-2006.log (first file)
> > > > > > > > > > SYSTEM-02-02-2006.log
> > > > > > > > > > SYSTEM-03-02-2006.log
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > >
> > > > > > > > > > André
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > James Stauffer
> > > > > > > > > Are you good? Take the test at http://www.livingwaters.com/good/
> > > > > > > > >
> > > > > > > > > ---------------------------------------------------------------------
> > > > > > > > > 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
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > James Stauffer
> > > > > > > Are you good? Take the test at http://www.livingwaters.com/good/
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > 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
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > James Stauffer
> > > > > Are you good? Take the test at http://www.livingwaters.com/good/
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > 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
> > > >
> > > >
> > >
> > >
> > > --
> > > James Stauffer
> > > Are you good? Take the test at http://www.livingwaters.com/good/
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
> 
> 
> -- 
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
> 
> ---------------------------------------------------------------------
> 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