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 Jeff Drew <je...@gmail.com> on 2007/04/16 14:05:14 UTC
Does log4j block if disk is full?
I'm using a RollingFileAppender on Solaris with Hotspot 1.5. The disk
partition recently filled and my application hung. The threads were alive,
but not processing input. Since log4j is the only function that writes to
the local disk, I'd like to know more about how it deals with this problem.
If a Logger tries to write, say with log.info("message") but the disk is
full, does the method just return immediately? If the method does not return
immediately, then can that be configured?
Thanks
Re: Does log4j block if disk is full?
Posted by Curt Arnold <ca...@apache.org>.
On Apr 16, 2007, at 7:05 AM, Jeff Drew wrote:
> I'm using a RollingFileAppender on Solaris with Hotspot 1.5. The disk
> partition recently filled and my application hung. The threads
> were alive,
> but not processing input. Since log4j is the only function that
> writes to
> the local disk, I'd like to know more about how it deals with this
> problem.
>
>
> If a Logger tries to write, say with log.info("message") but the
> disk is
> full, does the method just return immediately? If the method does
> not return
> immediately, then can that be configured?
>
> Thanks
The attempted write should throw a IOException within
org.apache.log4j.helpers.QuietWriter which is then caught and handled
by outputting a message to the console on the first failure
(OnlyOnceErrorHandler). Unless there is a custom error handler
involved, it should not block waiting for disk space to come available.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org