Share via


TraceSettings Class [IIS 7 and higher]

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.

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

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

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

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

See Also

Reference

EmbeddedObject Class [IIS 7 and higher]

SystemDiagnosticsSection Class [IIS 7 and higher]

TraceListenerSettings Class [IIS 7 and higher]

Other Resources

System.Diagnostics.Trace.Indent Method

System.Diagnostics.Trace.Flush Method

System.Diagnostics.TextWriterTraceListener Class

System.Diagnostics.EventLogTraceListener Class

System.Diagnostics.TraceListener.IsThreadSafe Property