Friday, May 18, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: asynchronous http logging
Prev Next
You are not authorized to post a reply.

Author Messages
Derek Williams

04/19/2007 11:47 PM  

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

Ron Grabowski

04/21/2007 4:05 AM  

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.

You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > asynchronous http logging



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement