programmatically get/set log level for a specific rule

1 message Options
Embed this post
Permalink
roger

programmatically get/set log level for a specific rule

Reply Threaded More More options
Print post
Permalink
What I'm trying to accomplish is turning on/off trace messages to a control on a form, but still send those messages to a log file.

I split the writeTo for trace into two rules because I thought it would make it easier to disable it.

I need to know how to programmatically enable/disable Trace logging to the control.

Here is my rule list:
<rules>
<logger name="MyApp" level="Info"  writeTo="applog, control" />
<logger name="MyApp" level="Trace" writeTo="applog" />
<logger name="MyApp" level="Trace" writeTo="control" />
</rules>

Thanks in advance for those attempting to help.


Roger.