Click here to Skip to main content
15,887,989 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

My question is simple but scenario is bit complex.

I want to configure Enterprise Lib Logging at runtime, how do I do that.

I have a library which is, logging data using EntLib 3.1 Logger Application Block. Now this library is being consumed in various services, so ideally logging should consume configuration setting from web.config of each services.

Now I don't want that, as my logging is going to be same in all services so I want to load logger from single configuration (Either from config of DLL or can load config for logger at runtime). I tried my all possible way, please help me if someone has any direction in this subject.

I went through following stuff, but those are not useful for me.

http://stackoverflow.com/questions/624436/can-i-change-the-configuration-of-the-enterprise-library-logging-block-at-runtim[^]

http://stackoverflow.com/questions/1771808/entlib-logging-add-edit-tracelisteners-at-runtime[^]

Thanks
Rushi
Posted
Updated 4-May-12 5:44am
v2

1 solution

 
Share this answer
 
Comments
Joshi, Rushikesh 4-May-12 16:46pm    
Mark, thank you for sharing your post. That is really a good thread but was not helpful to me. But thank you for sharing this.
[no name] 4-May-12 21:56pm    
You're welcome. I don't understand your question then. This at least showed how to load configuration files from different sources and at runtime, which is what you have described.
Joshi, Rushikesh 4-May-12 22:40pm    
Yes that is right, but my intention is to load for Logger and there is no any way to assign LogWriter to Logger object.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900