Turn off LogEnabled Filter at run time - Logging Enterprise Application Block
- by Or A
Hi,
so the story go like this:
i'm using the Logging Enterprise Application block that provided by microsoft to log events in our application.
The goal is to enabled event viewer logging at loading and then turn it off.
What i did is to add EventLog TraceListener which write all our logs into the event viewer. What i'm trying to do is to disable it after the application was done loading. The only way that i can thing about is to add a LogEnabled Filter and then turn it off.
However, i don't know how to access this filter at run time and disable log on this listener.
if you have an idea, please share.
Thanks