Show / Hide Table of Contents

Class LdCommonLogging

Provides integration between the LaunchDarkly SDK's logging framework and the Common.Logging facade.

Inheritance
System.Object
LdCommonLogging
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: LaunchDarkly.Logging
Assembly: LaunchDarkly.Logging.CommonLogging.dll
Syntax
public static class LdCommonLogging

Properties

Adapter

Returns an adapter for directing LaunchDarkly.Logging output to Common.Logging.

Declaration
public static ILogAdapter Adapter { get; }
Property Value
Type Description
LaunchDarkly.Logging.ILogAdapter

an ILogAdapter that delegates to Common.Logging

Remarks

Using this adapter will cause LaunchDarkly.Logging to delegate each logger it creates to a corresponding logger created with Common.Logging.LogManager.GetLogger. What happens to the log output then is entirely determined by the Common.Logging configuration; there are no configuration methods on the Adapter itself. The logger names that are used within the LaunchDarkly.Logging framework are passed along as logger names to Common.Logging, so they can be used in filtering rules, etc.

The example code below shows how to configure the LaunchDarkly SDK to use Common.Logging.

Examples
    using LaunchDarkly.Logging;
    using LaunchDarkly.Sdk.Server;

    var config = Configuration.Builder("my-sdk-key")
        .Logging(LdCommonLogging.Adapter)
        .Build();
    var client = new LdClient(config);
In This Article
Back to top Generated by DocFX