TraceSettings Class

Configures the ASP.NET trace functionality and controls how trace results are gathered, stored, and displayed.

Syntax

class TraceSettings : EmbeddedObject  

Methods

This class contains no methods.

Properties

The following table lists the properties exposed by the TraceSettings class.

Name Description
AutoFlush A read/write boolean value. true if the trace listeners automatically flush the output buffer after every write operation; otherwise, false. The default is false. Note: When the AutoFlush property is set to true, the trace listener writes to the file regardless of whether the System.Diagnostics.Trace.Flush method is called.
IndentSize A read/write sint32 value that specifies the number of spaces to indent when the System.Diagnostics.Trace.Indent method is called. The default is 4. Note: A System.Diagnostics.TextWriterTraceListener interprets this number as spaces. An EventLogTraceListener ignores this value. This property is stored on per-thread, per-request basis.
Listeners A TraceListenerSettings value that contains listeners that monitor and format trace output.
UseGlobalLock A read/write boolean value. true if the global lock will be used; otherwise, false. The default is true. Note: The global lock is always used if the trace listener is not thread safe, regardless of the value of UseGlobalLock. The System.Diagnostics.TraceListener.IsThreadSafe property determines whether the listener is thread safe. The global lock is not used only if the value of UseGlobalLock is false and the value of IsThreadSafe is true. The default behavior is to use the global lock.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the Trace property of the SystemDiagnosticsSection class.

Inheritance Hierarchy

EmbeddedObject

TraceSettings

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

EmbeddedObject Class
SystemDiagnosticsSection Class
TraceListenerSettings Class
System.Diagnostics.Trace.Indent Method
System.Diagnostics.Trace.Flush Method
System.Diagnostics.TextWriterTraceListener Class
System.Diagnostics.EventLogTraceListener Class
System.Diagnostics.TraceListener.IsThreadSafe Property