DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23021>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23021

Queue reading thread in AsyncAppender blocks if a called appender throws a 
RuntimeException

           Summary: Queue reading thread in AsyncAppender blocks if a called
                    appender throws a RuntimeException
           Product: Log4j
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Appender
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The inner class Dispatcher in org.apache.log4j.AsyncAppender runs as a thread 
and reads the logging event buffer which is filled by users of the 
AsyncAppender. The Dispatcher thread reads from this buffer and calls the 
append method of all previously added Appenders (in the run() method).

If one of this appenders throws a RuntimeException, it is not catched anywhere, 
and the endless loop in the run() method is exited and the thread dies. The 
logging event buffer is filled up until the buffer writer (in the main thread) 
blocks, which blocks the whole process. 
As Log4J usually is used as a trace module, such an error shall not block the 
whole productive process. It would be better if RuntimeExcpetions whould be 
catched, proberly traced and then continued.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to