The TraceDemo Example

The TraceDemo example illustrates the use of the diagnostic functionality. If you run the example, you will get the following output:

Trace Listeners:
   Default

Trace Listeners:
   Default
   Console.Out Listener
   Output File Listener

This was compiled with a DEBUG directive!
This was compiled with a TRACE directive!
               Debug Boolean Switch enabled at startup.
               Debug Boolean Switch enabled!
Trace Switch Startup Value = Warning
          TraceError!
          TraceWarning!
Trace Listeners:
   Console.Out Listener
   Output File Listener

File output.txt has been created

Refer to this output in the ensuing discussion. You will also find a file called output.txt ...

Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.