There is a Uri overload for the XmlConfigurator.Configure method. You could 
host the log4net.config file on a webserver somewhere. Or you could write code 
to extract it from a database during application startup.


----- Original Message ----

From: Scott Glass <[EMAIL PROTECTED]>

To: [email protected]

Sent: Tuesday, July 24, 2007 12:19:11 PM

Subject: Logging several IIS apps.



Can anyone give me an example of how we would have one localized configuration 
script or DB repository to control logging within an IIS Web Server framework?  
Right now we’re maintaining a logging.xml for each application (virtual 
directory, alias, etc.) in our system. I’d like to move it all to the wwwroot 
folder and have one instance, is this possible?

     

   I’ve been using the assembly property below to configure each app.  Pointing 
it to logging.xml. 

     

   [assembly: log4net.Config.XmlConfigurator(ConfigFile = "logging.xml", Watch 
= true)]

     

   But this seems to require that logging.xml be in the root of each 
application.

     

   Thanks,

   Scott

   

  







Reply via email to