Thanks!

Copytruncate works like a charm. We are using logrotate in addition to
Resin's log rollovers to manager additional logs such as p6spy etc.

-Manas

On Thu, 2007-06-07 at 09:23 +0100, [EMAIL PROTECTED] wrote:
> Agreed.  This is typical UNIX filesystem behaviour.  As soon as the file
> is closed, all the data is lost.
> 
> I use the 'copytruncate' keyword in my logrotate definition for resin.
> 
> Andy
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Gary Zhu
> Sent: Wednesday, June 06, 2007 11:50 PM
> To: 'General Discussion for the Resin application server'
> Subject: Re: [Resin-interest] Resin stops logging if logsare deleted
> manually
> 
> 
> The existing log file was not missing, just that you could not see it.
> Resin still had the file handle and wrote bytes into it.
> If you paid attention to the file system free space, you would see the
> log space was not released, until you restarted Resin.
> 
> If you still want to use logrotate, please use postrotate command to
> restart Resin; if you 'really' know logrotate, you would have noticed
> plenty of programs that use postrotate to reload or restart programs --
> for the very same reason. It's the UNIX thing.
> 
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Manas Gupta
> > Sent: Wednesday, June 06, 2007 3:26 PM
> > To: General Discussion for the Resin application server
> > Subject: Re: [Resin-interest] Resin stops logging if logs are deleted
> > manually
> >
> >
> > Still, wouldn't it make sense for Resin to start logging to
> > new file, if
> > the existing log file went missing.
> >
> > On Wed, 2007-06-06 at 16:38 -0500, Michael Ebeling wrote:
> > > > -----Original Message-----
> > > > Sent: Tuesday, June 05, 2007 11:54 AM
> > > > Subject: [Resin-interest] Resin stops logging if logs are deleted
> > > manually
> > > >
> > > > We are using Resin-3.0.19. Our access log is configured in
> > > resin.conf
> > > as follows
> > > >
> > > > <access-log path="log/access.log"
> > > >    format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"
> > > Time
> > > of request:<%Ts>'
> > > >    rollover-period="1D" archive-format="access-%Y%m%d.log.gz"/>
> > > >
> > > > If a utility like logrotate deletes the logs, resin stops logging
> > > > completely. The server continues to run and serve requests.
> > >
> > > Since you are using resin to roll the logs for you, it
> > would probably
> > > be
> > > better not to use logrotate to manipulate the same logs. Resin will
> > > also
> > > delete the oldest logs for you when it rolls them if you add the
> > > "rollover-count" directive:
> > >
> > >    <access-log path="log/access.log"
> > >      format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"
> > > Time
> > > of request:<%Ts>'
> > >      rollover-period="1D"
> > >      rollover-count="7"
> > >      archive-format="access-%Y%m%d.log.gz"/>
> > >
> > > This would save a week's worth of logs plus the current one, for
> > > example.
> > >
> > > > The same behaviour is observed for :-
> > > > stdout.log & stderr.log (configured at command line)
> > >
> > > We have entries in the resin conf file to handle our stderr-log and
> > > stdout-log the same way.
> > >
> > >
> > >
> > > _______________________________________________
> > > resin-interest mailing list
> > > resin-interest@caucho.com
> > > http://maillist.caucho.com/mailman/listinfo/resin-interest
> > >
> >
> >
> > _______________________________________________
> > resin-interest mailing list
> > resin-interest@caucho.com
> > http://maillist.caucho.com/mailman/listinfo/resin-interest
> >
> 
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
> 
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to