On May 22, 2006, at 4:00 AM, sol myr wrote:

Hi,

  We're integrating log4j into a project.
Performance is curucial, so we use Async File Appender.
I understand that logging requests are placed into a queue, which is consumed by a dedicated thread that performs the IO to file.

  My question:
What happends, by default, if the queue fills up (i.e. logging messages arrive too fast for the IO thread to handle) ? Can you tell log4j to silently dismiss messages, if queue is full ? The system is "almost realtime", so we'd rather loose a log message, than hinder performance.

  Thanks  very much.

AsyncAppender was recently rewritten to address several deadlock problems. In the new code if If blocking=false, logging requests will be counted when the queue is full and a summary appended when the appender catches up (http://issues.apache.org/bugzilla/ show_bug.cgi?id=38982). There has not been a release since that code was added to the SVN, so it is not available in a release at the moment. It has been added to the v1_2-branch, but there is currently no plan for another 1.2.x release. If you'd like to use the new AsyncAppender with a production log4j 1.2, I'd suggest copying the new AsyncAppender and changing the package name to one of your packages.

Prior to that rewrite, if the queue became full, any subsequent logging request that met the threshold would be blocked until the queue had an opening.

The code is fairly new, so any observations, bugs or feedback would be appreciated.

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

Reply via email to