Brian Sherwin's Blog

Moving at the Speed of .Net
posts - 98, comments - 62, trackbacks - 30

My Links

News

Twitter












Tag Cloud

Archives

Links

log4net

There are 2 entries for the tag log4net
When to check IsDebugEnabled when using log4net
I see this a lot in projects that I have been involved in where the code goes something like this: if (log.IsDebugEnabled) log.Debug ("Connecting to Database"); conn.Open(); or something similar when calling the other logging methods (Warn/IsWarnEnabled, Error/IsErrorEnabled, etc) Here's the point of this short post...you only need to check the log setting if what you about to do is time consuming. For example, if you are going to walk through a collection of objects and get a list of ID's that you...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Tuesday, July 15, 2008 10:43 PM | Feedback (0) |

Moving your Log4Net configuration out of web.config with ASP.NET 2.0 web sites.
I was working with log4net recently and had put a lot of the configuration information in the web.config file for an ASP.NET 2.0 web site. Ideally, this was not what I wanted because I want to be able to change the configuration of the log4net without recycling the web application (a side effect of changing the web.config file). After spending a fair amount of time reading out on the web--a lot of people said it can't be done. It took me piecing together multiple settings to finally get this to work....
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Friday, February 15, 2008 12:43 PM | Feedback (8) |

Powered by: