I'm using log4net logging in my DLL class library - I'm wondering where people would recommend I put the log4net configuration - in the App.config or in a separate .log4net config file?
+6
A:
App.Config
The reason for this is just one configuration file for your application. I always favor simplicity.
David Basarab
2009-08-12 17:10:51
Won't that mean users of the DLL won't be able to configure the logging?
Nosrama
2009-08-12 17:34:22
No they could, they can put it in there app.config. I have used Log4Net.dll dozen of times in many different applications just using 1 .config. Each application I want logged in a different place.
David Basarab
2009-08-12 17:40:52
If you have a web application, putting the config in web.config can cause a problem because changing the log4net config will then cause the web application to restart (this is not the case with a class library though as in in Nosrama's case).
adrianbanks
2009-08-12 18:31:57
@David Basarab: Have you used it in DLLs or just EXEs?
Nosrama
2009-08-12 20:07:06