logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Master" <tmas...@iknowledgeinc.com>
Subject How may I catch an IOException when there disk space has run out for a FileAppender?
Date Fri, 18 Jan 2002 01:32:34 GMT
1. How may I catch an exception thrown when there disk space has run out for
a FileAppender?

2.  It would be nice to register a listener (imho) for when diskspace runs
out.



Console Output  from such a scenario:

log4j:ERROR Failed to flush writer,
java.io.IOException: There is not enough space on the disk
        at java.io.FileOutputStream.writeBytes(Native Method)
        at java.io.FileOutputStream.write(FileOutputStream.java:212)
        at
java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:230)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:244)
        at org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:49)
        at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:309)
        at
org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.ja
va:294)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:157)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)

        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders
(AppenderAttachableImpl.java:57)
        at org.apache.log4j.Category.callAppenders(Category.java:255)
        at org.apache.log4j.Category.forcedLog(Category.java:445)
        at org.apache.log4j.Category.info(Category.java:704)


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message