The System.Diagnostics provide a very nice infrastructure for logging. When you start an app, by default a DefaultTraceListener is added to the Debug.Listeners collection. The problem is that the DefaultTraceListener instance has the property AssertUiEnabled set to true. This will popup a nice message box, in case for example of this statement
In winforms or console apps this is quite nice. Especially the possibility to attempt a retry ...
In case you need to disable this dialog: for a wpf app, for asp.net, for a wcf service... then you simply need to set the AssertUiEnabled property to false. In addition you can wire your own outputs...
1 comments:
Post a comment