On Mar 15, 2006, at 12:04 PM, Robert Fischer wrote:

Hi,

i'm developing a custom appender/receiver for the current SVN version of log4j. My problem is that establishing a connection to the remote server is quite time consuming, so the user has to wait a few seconds before sending a LoggingEvent. I've separated the connection process into a new thread but now my question is what's the "good practice" in log4j to adress this kind of
problem:

- blocking the first append() call until the connection is established? IMHO
not very comfortable for the user

- routing incoming LoggingEvents through a RingBuffer like the SMTPAppender
does?

- switching the "active" field to "false" until the connection is established
and let the user poll for isActive()?

TIA,
Robert

I hope to have a rework of AsyncAppender committed into the SVN today. There have been a lot of reports of deadlocks with the old code and who knows what new and interesting bugs that I will have introduced. However, I think it would be best practice is to write blocking appenders and use AsyncAppender to provide a consistent async layer above it.


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

Reply via email to