You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Shireesh Thanneru <th...@yahoo.com> on 2005/08/19 21:47:58 UTC

Log4Net Implentation Details - Is it Synchronous or Asynchronous?

Forgive me if this questions was already asked before. I did read the archives, but couldn't find a similar entry. My question is does Log4Net does logging synchronously (basically, for example, log.Info(msg) does not return until msg is physically written to the log file/sink) or asynchronously (log.info(msg) will immediately return and the actual logging happens later asynchronously).
 
If it is synchronous, I would like to know how log4net managed to be so fast (is there any other interal buffering/queueing going on or is it a pure blocking call)? We are implementing an Instrumentation extension (that logs how much time each method is taking to a performance log file and/or a performance counter) to log4net and are debating whether to do it asynchonously/synchonoulsy or to use multithreading. Your recommendation is greatly appreciated.
 
Thanks for your help.
 
Regards,
 
Shireesh Thanneru