logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Does log4j block if disk is full?
Date Tue, 17 Apr 2007 05:23:30 GMT

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

View raw message