Hi, I posted this question on stack overflow but haven't gotten any answers. You can see the question here. http://stackoverflow.com/questions/7045316/log4net-stops-using-custom-re nderers
I have a WCF application for which I have created some custom renderers so that I can keep my log statements as DRY as possible. When I first deploy my app log4net doesn't recognize the custom renderers but it does do everything else correctly. If I touch the config file it (make it looked changed) the file watcher picks up the change and the renderers start working. However after a time they stop working again and I have to touch the log4net config file again. The setup is a .Net 3.5 (sp1) wcf application. The problem occurs in both the vs 2008 development web server and on IIS 7 on win 2008. I have a config file called log4net.config and I'm using the AssemblyInfo method for point at it. [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)] The way I access a logger is through the use of static members on the class like so. private static readonly ILog log = LogManager.GetLogger(typeof(Service)); The renderers are configured similar to this. <renderer renderingClass="MyCompany.Log4net.SearchRequestRenderer, MyCompany.Log4net" renderedClass="System.DirectoryServices.Protocols.SearchRequest" /> These renderers are all in a separate assembly from the main where the logging is taking place. I should mention that all other bits of the log file are being read correctly and are working fine. Am I missing something or doing something wrong? I don't know why it doesn't recognize the renderers right away and then forgets them again later.
