Table of Contents

Class LoggingConfigurationExtensions

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

Provides extension methods used for programmatic configuration of the Logging Application Block.

public static class LoggingConfigurationExtensions
Inheritance
LoggingConfigurationExtensions
Inherited Members

Methods

AddAsynchronousTraceListener(LogSourceData, TraceListener, int?, int?, TimeSpan?)

Adds the specified TraceListener to the log source to work asynchronously.

public static void AddAsynchronousTraceListener(this LogSourceData logSource, TraceListener traceListener, int? bufferSize = 30000, int? maxDegreeOfParallelism = null, TimeSpan? disposeTimeout = null)

Parameters

logSource LogSourceData

The log source to add the trace listener to.

traceListener TraceListener

The trace listener to add.

bufferSize int?

The size of the buffer for asynchronous requests.

maxDegreeOfParallelism int?

The max degree of parallelism for thread safe listeners. Specify null to use the current core count.

disposeTimeout TimeSpan?

The timeout for waiting to complete buffered requests when disposing. When null the default of InfiniteTimeSpan is used.

AddAsynchronousTraceListener(SpecialLogSourceData, TraceListener, int?, int?, TimeSpan?)

Adds the specified TraceListener to the special log source to work asynchronously.

public static void AddAsynchronousTraceListener(this SpecialLogSourceData logSource, TraceListener traceListener, int? bufferSize = 30000, int? maxDegreeOfParallelism = null, TimeSpan? disposeTimeout = null)

Parameters

logSource SpecialLogSourceData

The special log source to add the trace listener to.

traceListener TraceListener

The trace listener to add.

bufferSize int?

The size of the buffer for asynchronous requests.

maxDegreeOfParallelism int?

The max degree of parallelism for thread safe listeners. Specify null to use the current core count.

disposeTimeout TimeSpan?

The timeout for waiting to complete buffered requests when disposing. When null the default of InfiniteTimeSpan is used.

AddTraceListener(LogSourceData, TraceListener)

Adds the specified TraceListener to the log source.

public static void AddTraceListener(this LogSourceData logSource, TraceListener traceListener)

Parameters

logSource LogSourceData

The log source to add the trace listener to.

traceListener TraceListener

The trace listener to add.

AddTraceListener(SpecialLogSourceData, TraceListener)

Adds the specified TraceListener to the special log source.

public static void AddTraceListener(this SpecialLogSourceData logSource, TraceListener traceListener)

Parameters

logSource SpecialLogSourceData

The special log source to add the trace listener to.

traceListener TraceListener

The trace listener to add.