You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jan Kaluža <jk...@redhat.com> on 2011/10/11 10:52:13 UTC
[PATCH] New rotatelogs option to create empty logs
Hi,
attached patch against trunk adds new rotatelogs option "-c" to create
logs after tRotation time even if there are no messages to log during
tRotation time. This is achieved by calling apr_poll() on stdin with
proper timeout before apr_file_read (which blocks until there are some
data on stdin).
This feature is useful when logs are processed automatically and missing
logs add additional complexity to these activities. It can also help in
situation when one doesn't know if missing log means some problem or
there just wasn't anything to log.
Thanks for reviewing,
Jan Kaluza
Re: [PATCH] New rotatelogs option to create empty logs
Posted by Jan Kaluža <jk...@redhat.com>.
On 10/13/2011 02:08 PM, Joe Orton wrote:
> On Tue, Oct 11, 2011 at 10:52:13AM +0200, Jan Kaluža wrote:
>
> Hi Jan, thanks for sending in the patch.
>
> I think this feature needs to be disabled on platforms where poll does
> not work on files - the APR_FILES_AS_SOCKETS macro exists for this test,
> so it would need:
>
> #if APR_FILES_AS_SOCKETS
Thanks for the response,
attached is the patch which adds it.
> around the new bits of code. I can't see any other problems.
>
> Regards, Joe
Regards,
Jan Kaluza
Re: [PATCH] New rotatelogs option to create empty logs
Posted by Joe Orton <jo...@redhat.com>.
On Tue, Oct 11, 2011 at 10:52:13AM +0200, Jan Kaluža wrote:
> Hi,
>
> attached patch against trunk adds new rotatelogs option "-c" to
> create logs after tRotation time even if there are no messages to
> log during tRotation time. This is achieved by calling apr_poll() on
> stdin with proper timeout before apr_file_read (which blocks until
> there are some data on stdin).
>
> This feature is useful when logs are processed automatically and
> missing logs add additional complexity to these activities. It can
> also help in situation when one doesn't know if missing log means
> some problem or there just wasn't anything to log.
Hi Jan, thanks for sending in the patch.
I think this feature needs to be disabled on platforms where poll does
not work on files - the APR_FILES_AS_SOCKETS macro exists for this test,
so it would need:
#if APR_FILES_AS_SOCKETS
around the new bits of code. I can't see any other problems.
Regards, Joe