Hi,

I'm trying to use log4net in a class library, so there's no .config file or 
global.asax file. Usually I have the following assembly attribute in the 
global.asax.cs to instruct log4net where to find the config file (named 
<myassembly>.dll.log4net):

[assembly: log4net.Config.DOMConfigurator(ConfigFileExtension="log4net", 
Watch=true)]

Since there's no global.asax.cs, I have the above assembly attribute in one of 
the class files in the class library. Is this the wrong place to put it? It 
doesn't appear that log4net is reading the config file.

How do I get this to work in a class library like this?

Simon.

Reply via email to