You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Alan Brown <ab...@symyx.com> on 2004/11/17 23:26:16 UTC

rollover failing...

We've got log4j set up with a RollingFileAppender with a
TimeBasedRollingPolicy.  Within the development environment, we're fond
of using 'tail -f' to view the logging in real time.  However, rollover
fails if the logs are being tailed when it occurs with a
FileNotFoundException.



I was wondering if there is any workaround for this problem.  I
understand that the inability to create the FileOutputStream is a
function of Java's implementation of File handling, but I'm hoping there
may be some semi-graceful way that log4j could handle this problem.



Ideally, I'd like the system to be able to create another log file with
a suffix appended so core.log would become core1.log.  I looked at the
source code for this and there's no way I can do it  and still be able
to upgrade to future versions of log4j when they're available.



Does anyone else suffer from this problem?



Any advice would be appreciated. 



alan



=======
Notice: This e-mail message, together with any attachments, contains
information of Symyx Technologies, Inc. that may be confidential,
proprietary, copyrighted, privileged and/or protected work product,
and is meant solely for the intended recipient. If you are not the
intended recipient, and have received this message in error, please
contact the sender immediately, permanently delete the original and
any copies of this email and any attachments thereto.

Re: rollover failing...

Posted by Ceki Gülcü <ce...@qos.ch>.
Hello Alan,

This problem is fixed in the the o.a.l.rolling package introduced in log4j 1.3.

If you need to fix it for 1.2, then read

http://marc.theaimsgroup.com/?t=109153271700001&r=1&w=2

HTH,

At 11:26 PM 11/17/2004, Alan Brown wrote:

>We've got log4j set up with a RollingFileAppender with a
>TimeBasedRollingPolicy.  Within the development environment, we're fond
>of using 'tail -f' to view the logging in real time.  However, rollover
>fails if the logs are being tailed when it occurs with a
>FileNotFoundException.
>
>I was wondering if there is any workaround for this problem.  I
>understand that the inability to create the FileOutputStream is a
>function of Java's implementation of File handling, but I'm hoping there
>may be some semi-graceful way that log4j could handle this problem.
>
>Ideally, I'd like the system to be able to create another log file with
>a suffix appended so core.log would become core1.log.  I looked at the
>source code for this and there's no way I can do it  and still be able
>to upgrade to future versions of log4j when they're available.
>
>Does anyone else suffer from this problem?
>
>Any advice would be appreciated.
>
>
>alan

-- 
Ceki Gülcü

  The complete log4j manual:  http://qos.ch/eclm
  Professional log4j support: http://qos.ch/log4jSupport  



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: rollover failing...

Posted by Jacob Kjome <ho...@visi.com>.
I noticed this when using Log4j to configure Tomcat-5.5.4 logging.  I received a
message saying that Log4j failed to roll the log (using
DailyRollingFileAppender).  I'm running Tomcat as a service.  Not sure if that
has anything to do with it specifically, but it does seem to be a problem. 
Anyone know a solution?


Jake

Quoting Alan Brown <ab...@symyx.com>:

>
> We've got log4j set up with a RollingFileAppender with a
> TimeBasedRollingPolicy.  Within the development environment, we're fond
> of using 'tail -f' to view the logging in real time.  However, rollover
> fails if the logs are being tailed when it occurs with a
> FileNotFoundException.
>
>
>
> I was wondering if there is any workaround for this problem.  I
> understand that the inability to create the FileOutputStream is a
> function of Java's implementation of File handling, but I'm hoping there
> may be some semi-graceful way that log4j could handle this problem.
>
>
>
> Ideally, I'd like the system to be able to create another log file with
> a suffix appended so core.log would become core1.log.  I looked at the
> source code for this and there's no way I can do it  and still be able
> to upgrade to future versions of log4j when they're available.
>
>
>
> Does anyone else suffer from this problem?
>
>
>
> Any advice would be appreciated.
>
>
>
> alan
>
>
>
> =======
> Notice: This e-mail message, together with any attachments, contains
> information of Symyx Technologies, Inc. that may be confidential,
> proprietary, copyrighted, privileged and/or protected work product,
> and is meant solely for the intended recipient. If you are not the
> intended recipient, and have received this message in error, please
> contact the sender immediately, permanently delete the original and
> any copies of this email and any attachments thereto.




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org