Logging inside Library regardless of app config

Topics: Logging Application Block
Aug 21, 2008 at 5:06 PM
Edited Aug 21, 2008 at 5:07 PM
Is there a way to bypass the app config and configure the logging inside a library (dll) regardless what the application's config is?

Considering an attempt to log in a lib, and the application does not provide any logging configuration, the error of " The configuration section for Logging cannot be found in the configuration source" would arise.
I am hoping that, no matter what the app config is, the dll itself can log independently. Is there a way to do so?

Aug 21, 2008 at 5:59 PM
There is no such a way if you use the Logger static facade. There are a few previous discussions about using the LogWriterFactory to deal with this like http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=11907; you can find more in http://www.codeplex.com/entlib/Thread/List.aspx?SearchText=LogWriterFactory.

Fernando
Aug 21, 2008 at 8:20 PM
Thanks.