Jack,
I had a similar problem a few weeks ago and as it turned out, I was
using an older version of log4net assembly with a newer configuration
format. Of course, the cause of your problem might not be the same, but
SysInternal's DebugView
(http://www.sysinternals.com/Utilities/DebugView.html) along with the Event
Log was instrumental in helping me figuring out what the problem was. (On a
side note, my COM+ (Enterprise Service) component didn't catch any exception
either.)
Hope this helps,
Jason
-----Original Message-----
From: Craig Boland [mailto:[EMAIL PROTECTED]
Sent: Monday, July 25, 2005 7:55 PM
To: 'Jack Yang'; [email protected]
Subject: RE: Configuration in COM+ Server Application
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