Table of Contents

Class TraceSourceData

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging.Configuration
Assembly
Microsoft.Practices.EnterpriseLibrary.Logging.dll

Represents the configuration settings that describe a LogSource.

public class TraceSourceData : NamedConfigurationElement
Inheritance
TraceSourceData

Constructors

TraceSourceData()

Initializes a new instance of the TraceSourceData class with default values.

public TraceSourceData()

TraceSourceData(string, SourceLevels)

Initializes a new instance of the TraceSourceData class with name and default level.

public TraceSourceData(string name, SourceLevels defaultLevel)

Parameters

name string

The name for the represented log source.

defaultLevel SourceLevels

The trace level for the represented log source.

TraceSourceData(string, SourceLevels, bool)

Initializes a new instance of the TraceSourceData class with name, default level and auto flush;

public TraceSourceData(string name, SourceLevels defaultLevel, bool autoFlush)

Parameters

name string

The name for the represented log source.

defaultLevel SourceLevels

The trace level for the represented log source.

autoFlush bool

If Flush should be called on the Listeners after every write.

Properties

AutoFlush

Gets or sets the AutoFlush indicating whether Flush should be called on the Listeners after every write.

public bool AutoFlush { get; set; }

Property Value

bool

DefaultLevel

Gets or sets the default SourceLevels for the trace source.

public SourceLevels DefaultLevel { get; set; }

Property Value

SourceLevels

TraceListeners

Gets the collection of references to trace listeners for the trace source.

public NamedElementCollection<TraceListenerReferenceData> TraceListeners { get; }

Property Value

NamedElementCollection<TraceListenerReferenceData>