P
Peter Larsen [CPH]
Hi,
How to i update a TraceSwitch from app.config in runtime - without
restarting the application.
I use dotNet 3.5.
I know how to refresh the section in memory, but i dont know how to read the
properties from the updated section.
This is what i have:
System.Configuration.ConfigurationManager.RefreshSection("system.diagnostics");
object section =
System.Configuration.ConfigurationManager.GetSection("system.diagnostics");
TraceSwitch fileTraceLevel = new TraceSwitch("FileTraceListenerSwitch",
"explanation...");
or
fileTraeLevel.Level = (TraceLevel)section.??? !!
How do i get the level information from the section ??
Thank you in advance.
BR
Peter
How to i update a TraceSwitch from app.config in runtime - without
restarting the application.
I use dotNet 3.5.
I know how to refresh the section in memory, but i dont know how to read the
properties from the updated section.
This is what i have:
System.Configuration.ConfigurationManager.RefreshSection("system.diagnostics");
object section =
System.Configuration.ConfigurationManager.GetSection("system.diagnostics");
TraceSwitch fileTraceLevel = new TraceSwitch("FileTraceListenerSwitch",
"explanation...");
or
fileTraeLevel.Level = (TraceLevel)section.??? !!
How do i get the level information from the section ??
Thank you in advance.
BR
Peter