> -----Original Message----- > From: Ron Grabowski [mailto:[EMAIL PROTECTED] > Sent: 23 March 2005 15:28 > To: Log4NET User > Subject: Re: Release of log4net 1.2.9 beta > > I noticed this page: > > http://logging.apache.org/log4net/release/manual/internals.html > > doesn't talk about the new DebugFormat, InfoFormat, etc. > members of ILog.
I will update it. > Are these two snippets identical? > > if(log.IsDebugEnabled) > { > log.Debug("Entry number: " + i + " is " + entry[i].ToString()); } > > log.DebugFormat("Entry number: {0} is {1}", i, entry[i]); > Nearly but not quite. They have the same effect but there are a couple of little differences. If logging is disabled (i.e. log.IsDebugEnabled returns false) then the first method will only evaluate the log.IsDebugEnabled property and then move on. The second method will create an array for the 2 parameters "i" and "entry[i]", the value of "entry[i]" will be resolved (it could be expensive, we don't know what the implementation is). > What was the design decision behind adding new members to > ILog rather than overloaded existing ones? Why not just add > Debug(string format, params object[] args)? This was discussed a couple of time. Consider this existing code: // ILog interface void Debug(object message, Exception ex); // User code Debug("Message and exception", new Exception()); This code is used by lots of people right now. If you add this method to ILog: void Debug(string message, params object[] args); You then get this compile time error: error CS0121: The call is ambiguous between the following methods or properties: 'ILog.Debug(string, params object[])' and 'ILog.Debug(object, System.Exception)' Therefore it has to have a different method name. This is similar to the StringBuilder which has Appender and AppendFormat methods. > > When was the last version of log4net that wasn't a beta? > 1.1.1 was released in 2002-04-13. That is the last release without a beta tag, however the 1.2 beta 8 and now beta 9 releases are of much higher quality. Cheers, Nicko > > - Ron > > --- Nicko Cadell <[EMAIL PROTECTED]> wrote: > > Greetings, > > > > Log4net developers are happy to announce the release of > log4net 1.2.9 > > beta. This, our first release during incubation at apache, includes > > many enhancements and bug fixes. > > > > The log4net website documentation has been updated to be in > sync with > > this release. > > > > The release notes are available here: > > http://logging.apache.org/log4net/release/release-notes.html > > > > The release can be downloaded here: > > http://logging.apache.org/log4net/downloads.html > > > > ---- > > Nicko Cadell > > log4net dev > > >