You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Christoph Macheiner <Ch...@update.com> on 2008/01/18 14:13:04 UTC
zip/gzip rollover not working
in ZipCompressAction::execute() and GZCompressAction::execute(), an
attempt is made to redirect the child's error stream to this processes'
error stream. on failure, an exception is thrown. now (at least on
windows systems) a process does not necessarily have an error stream (at
least not initially, or when the redirection is closed eg. during
shutdown), which causes the appender to never rollover. i think this
should be fixed. apr_file_open_stderr() return APR_EINVAL when it cannot
obtain the handle but the os returns success, so this could be checked.
otherwise i would need to redirect stderr in all applications (and leave
it open until the last log message) which does not seem to be right at
all.
(and yes, i am using the latest svn head)
thanks, christoph
Re: zip/gzip rollover not working
Posted by Curt Arnold <ca...@apache.org>.
On Jan 18, 2008, at 7:13 AM, Christoph Macheiner wrote:
> in ZipCompressAction::execute() and GZCompressAction::execute(), an
> attempt is made to redirect the child's error stream to this
> processes'
> error stream. on failure, an exception is thrown. now (at least on
> windows systems) a process does not necessarily have an error stream
> (at
> least not initially, or when the redirection is closed eg. during
> shutdown), which causes the appender to never rollover. i think this
> should be fixed. apr_file_open_stderr() return APR_EINVAL when it
> cannot
> obtain the handle but the os returns success, so this could be
> checked.
> otherwise i would need to redirect stderr in all applications (and
> leave
> it open until the last log message) which does not seem to be right at
> all.
>
> (and yes, i am using the latest svn head)
>
> thanks, christoph
Thanks for the report. In rev 613208, I've changed the code so that a
non-success return from apr_file_open_stderr does not throw an
exception, but just skips setting the child processes error stream.
Would appreciate your checking whether that addresses your concern,
otherwise please suggest a patch.