You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joe Orton <jo...@redhat.com> on 2011/06/20 12:43:33 UTC
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 more general
-p mode just added - is it worth keeping?
http://svn.apache.org/viewvc?view=revision&revision=1137590
Regards, Joe
Re: svn commit: r916377 - in /httpd/httpd/trunk: CHANGES
docs/manual/programs/rotatelogs.xml support/rotatelogs.c
Posted by Joe Orton <jo...@redhat.com>.
On Mon, Jun 20, 2011 at 04:14:10PM +0200, Graham Leggett wrote:
> On 20 Jun 2011, at 12:58 PM, Plüm, Rüdiger, VF-Group wrote:
>
> >>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.
>
> +1.
OK, fair enough - thanks guys. I've fixed the error case and simplified
the code a little in r1140138.
Regards, Joe
Re: svn commit: r916377 - in /httpd/httpd/trunk: CHANGES docs/manual/programs/rotatelogs.xml support/rotatelogs.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 20 Jun 2011, at 12:58 PM, Plüm, Rüdiger, VF-Group wrote:
>> 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.
+1.
Regards,
Graham
--
RE: svn commit: r916377 - in /httpd/httpd/trunk: CHANGES docs/manual/programs/rotatelogs.xml support/rotatelogs.c
Posted by "Plüm, Rüdiger, VF-Group" <ru...@vodafone.com>.
> -----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