Have you considered a static constructor? They execute at most one time and are thread-safe. If you have several classes in your component it may be better to more the log4net construction into a separate class or method so it can be synchronized. The Double-Checked Locking pattern may be useful there.
-----Original Message----- From: Jack Yang [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 5:31 PM To: [email protected] Subject: Configuration in COM+ Server Application We are trying to use log4net (1.2.0-beta8) inside a COM+ Server Application on Windows Server 2000. We programmed the COM+ component in .Net. log4net does not log anything and there is no exception (If there is any exception, our component will write that to database). The log4net configuration is inside DLLHOST.exe.config under Windows/System32. My questions is where I should put the code of loading log4net configuration (see blow) in a .Net Enterprise Service project. log4net.Config.DOMConfigurator.Configure() Any suggestions? Thanks for your help in advance! Jack
