The log4net-user list is the best place to ask these questions. http://logging.apache.org/log4net/support.html
log4net works synchronously. this means that asynchronous behaviour can be added if required. using asynchronous behaviour to increase performance does require some carful thinking because you need to understand the data that needs to be captured synchronously before the logging event can be processed asynchronously. log4net captures data from the applications environment at the time the message is logged, this must happen on the thread that is logging. There is an AsyncAppender example in the latest version of the source code in the subversion repository. http://svn.apache.org/viewcvs.cgi/logging/log4net/trunk/examples/net/1.0 /Appenders/SampleAppendersApp/cs/src/Appender/AsyncAppender.cs?rev=31231 9&view=markup This appender can be used to wrap any other appender, for example: <appender name="AsyncSmtpAppender" type="SampleAppendersApp.Appender.AsyncAppender,SampleAppendersApp"> <appender-ref ref="SmtpAppender" /> </appender> The AsyncAppender receives the event synchronously, captures any required state from the current context then queues a work item with the ThreadPool to continue logging the event. This allows the event to be processed asynchronously. While this is a general approach that works for all appenders it may not be the most efficient way of processing asynchronously for any specific appender. If you need very low latency logging you may need to write your own appender. Cheers, Nicko > -----Original Message----- > From: Ken Chu [mailto:[EMAIL PROTECTED] > Sent: 23 February 2006 19:33 > To: Nicko Cadell > Subject: RE: a question about .Net 2.0 and log4net > > Hi Nicko, > > Thanks for the great explanation. > > I also have a question about asynchronous logging. I > couldn't find any references in the mailing list archives or > the SDK reference about whether log4net can add log entries > asynchronously. In our web application, each request will be > a different thread. It would be highly desirable to have the > log entries appended asynchronously for better performance. > Is that something already built into log4net or is it > something I would have to add? > > Thanks again for your help. > > -Ken > > -----Original Message----- > From: Nicko Cadell [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 23, 2006 10:46 AM > To: Ken Chu > Cc: [email protected] > Subject: RE: a question about .Net 2.0 and log4net > > Ken, > > The http://logging.apache.org/log4net/release/framework-support.html > page lists the frameworks that we build log4net for. We build > specific versions for each framework to take advantage of new > features that are available in new frameworks. This page > lists the minor differences between the builds. > > The log4net assemblies support binary backward compatibility. > The .NET 1.0 build of log4net will run fine on the .NET 1.1 > and .NET 2.0 runtimes. There is no problem using the .NET 1.0 > or .NET 1.1 builds of log4net with the .NET 2.0 runtime. > > There is a special build, the 'CLI 1.0 Compatible' build, > which only uses ECMA/ISO CLI 1.0 standard APIs. This build > runs on all the runtimes that support CLI 1.0, these include > all the Microsoft runtimes (except the Compact Framework) and > the Mono runtimes. > > The log4net source for the last release (1.2.0.8) builds > using the .NET 2.0 compilers but generates warnings due to > deprecated APIs and some errors in the doc comments. The > currently checked in source code builds cleanly using the > .NET 2.0 and Mono 2.0 compilers. > > Cheers, > Nicko > > > -----Original Message----- > > From: Ken Chu [mailto:[EMAIL PROTECTED] > > Sent: 23 February 2006 03:56 > > To: Nicko Cadell > > Subject: a question about .Net 2.0 and log4net > > > > Hi Nicko, > > > > > > > > I work at Zazzle.com, and I would like to use log4net with > .Net 2.0. > > I noticed that it isn't listed as a supported framework. > Do you know > > when that support will be added? > > > > > > > > Thanks, > > > > Ken Chu > > > > [EMAIL PROTECTED] > > > > >
