httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plüm, Rüdiger, VF-Group" <ruediger.pl...@vodafone.com>
Subject RE: svn commit: r916377 - in /httpd/httpd/trunk: CHANGES docs/manual/programs/rotatelogs.xml support/rotatelogs.c
Date Mon, 20 Jun 2011 10:58:39 GMT
 

> -----Original Message-----
> From: Joe Orton 
> Sent: Montag, 20. Juni 2011 12:44
> To: dev@httpd.apache.org
> Subject: Re: svn commit: r916377 - in /httpd/httpd/trunk: 
> CHANGES docs/manual/programs/rotatelogs.xml support/rotatelogs.c
> 
> Dredging up an change from last year:
> 
> On Thu, Feb 25, 2010 at 06:00:43PM -0000, poirier@apache.org wrote:
> > Author: poirier
> > Date: Thu Feb 25 18:00:42 2010
> > New Revision: 916377
> > 
> > URL: http://svn.apache.org/viewvc?rev=916377&view=rev
> > Log:
> > Add -L option to create a hard link to the current log file.  
> ...
> > @@ -351,6 +354,20 @@
> >          status->pfile_prev = NULL;
> >      }
> >      status->nMessCount = 0;
> > +    if (config->linkfile) {
> > +        apr_file_remove(config->linkfile, status->pfile);
> > +        if (config->verbose) {
> > +            fprintf(stderr,"Linking %s to %s\n", 
> status->filename, config->linkfile);
> > +        }
> > +        rv = apr_file_link(status->filename, config->linkfile);
> 
> This snippet gets invoked even in the case where opening a 
> new log file 
> fails, and the old one is truncated and re-used; it will then 
> fail and 
> break the link, I think.  -L is kind of redundant with the 

Why? Because status->filename is not pointing to the old filename?

> more general 
> -p mode just added - is it worth keeping?

I think it is worth keeping for those people that only need the link.
Creating a post rotation script that does this seems to be a little
bit of overkill in this case.

Regards

Rüdiger

Mime
View raw message