System.Diagnostics.TraceOptions Enumeration

Specifies trace data options to be written to the trace output.

Syntax

[System.Flags]
public enum TraceOptions

Remarks

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.

Example

<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:

Members

Member NameDescription
Callstack

Write the call stack, which is represented by the return value of the Environment.StackTrace property.

DateTime

Write the date and time.

LogicalOperationStack

Write the logical operation stack, which is represented by the return value of the CorrelationManager.LogicalOperationStack property.

None

Do not write any elements.

ProcessId

Write the process identity, which is represented by the return value of the Process.Id property.

ThreadId

Write the thread identity, which is represented by the return value of the System.Threading.Thread.ManagedThreadId property for the current thread.

Timestamp

Write the timestamp, which is represented by the return value of the Stopwatch.GetTimestamp method.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0