This enumeration is used by trace listeners to determine which options, or elements, should be included in the trace output. Trace listeners store the trace options in the TraceListener.TraceOutputOptions property.
The following example shows the use of the traceOutputOptions attribute to specify the trace output options for a System.Diagnostics.ConsoleTraceListener that is enabled using a configuration file.
<configuration> <system.diagnostics> <trace autoflush="false" indentsize="4"> <listeners> <add name="consoleListener" type="System.Diagnostics.ConsoleTraceListener"
For details about adding trace listeners to the application configuration file, see <listeners> Element.
The System.Diagnostics.TraceOptions enumeration is not used by the following classes and methods:
The System.Diagnostics.EventLogTraceListener class, because it can cause a large volume of data to be written to the log.
The erload:System.Diagnostics.TraceListener.Write and erload:System.Diagnostics.TraceListener.WriteLine methods of the System.Diagnostics.TraceListener class when they are not overridden in a derived class.
Write the call stack, which is represented by the return value of the Environment.StackTrace property.
Write the date and time.
Write the logical operation stack, which is represented by the return value of the CorrelationManager.LogicalOperationStack property.
Do not write any elements.
Write the process identity, which is represented by the return value of the Process.Id property.
Write the thread identity, which is represented by the return value of the System.Threading.Thread.ManagedThreadId property for the current thread.
Write the timestamp, which is represented by the return value of the Stopwatch.GetTimestamp method.