You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by sol myr <so...@yahoo.com> on 2006/05/22 11:00:02 UTC
AsyncFileAppender - Configure behavior when queue is full ?
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.
---------------------------------
Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice
Re: AsyncFileAppender - Configure behavior when queue is full ?
Posted by sol myr <so...@yahoo.com>.
Very cool, thanks very much :)
Curt Arnold <ca...@apache.org> wrote:
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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.
Re: AsyncFileAppender - Configure behavior when queue is full ?
Posted by Curt Arnold <ca...@apache.org>.
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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org