Dela via


TraceLogProvider Class

Definition

Implements a trace log provider for .Net tracing.

public class TraceLogProvider : Microsoft.Azure.Documents.ChangeFeedProcessor.Logging.ILogProvider
type TraceLogProvider = class
    interface ILogProvider
Public Class TraceLogProvider
Implements ILogProvider
Inheritance
TraceLogProvider
Implements

Examples

using Microsoft.Azure.Documents.ChangeFeedProcessor.Logging;

var hostName = "SampleHost";
var tracelogProvider = new TraceLogProvider();
using (tracelogProvider.OpenNestedContext(hostName))
{
    LogProvider.SetCurrentLogProvider(tracelogProvider);

    // After this, create IChangeFeedProcessor instance and start/stop it.
}

Constructors

TraceLogProvider()

Initializes a new instance of the TraceLogProvider class.

Methods

GetLogger(String)

Gets the logger with specified name.

OpenMappedContext(String, String)

Opens a mapped diagnostics context.

OpenNestedContext(String)

Opens a nested diagnostics context.

Applies to