List Info

Thread: Re: asynchronous http logging




Re: asynchronous http logging
country flaguser name
United States
2007-04-20 21:05:24
I recall seeing some numbers from a long time ago showing
that the async code in NLog is faster than the
AsyncAppender. You may want to investigate that. I think
there are test cases showing the speed of the log4net
AsyncAppender vs. the NLog appender in the NLog
distribution. I haven't run those tests myself.

log4net's AsyncAppender processes items by using a delegate
passed to System.Threading.ThreadPool.QueueUserWorkItem
which then processes the log on a background thread. It
looks like NLog uses some sort of producer/consumer pattern.
When it recieves a message it immediately posts it to a
shared queue then a consumer deques the item (or batch of
items) using a Timer (every 50ms?) and processes them on a
seperate thread. 

I haven't used the AsyncAppender or NLog's
AsyncTargetWrapper so I could be way off with my comments.

----- Original Message ----
From: Derek Williams <dwilliamsburtongroup.com>
To: "log4net-devlogging.apache.org"
<log4net-devlogging.apache.org>
Sent: Thursday, April 19, 2007 5:47:30 PM
Subject: asynchronous http logging

Reposting - I apologize for the previous HTML post.  Hit
send too early.  Anyway...

We are looking at log4net as a new logging app but are
really interested in something that will allow us to handle
all logging asynchronously.  Basically, we want the HTTP
request to complete without waiting for the logger to
finish.  I was reading in the documentation about logging in
multi-threaded apps and also saw a newsgroup post regarding
the AsyncForwardAppender, but did not find anything touching
multithreaded logging in a single thread http environment. 
Does log4net support the functionality we're looking for? 
If not, is that a feature that is on the development roadmap
at all?  Please let me know if I totally missed something
obvious in the documentation.  I appreciate any help you can
provide.



Derek




[1]

about | contact  Other archives ( Real Estate discussion Medical topics )