Class LdCommonLogging
Provides integration between the LaunchDarkly SDK's logging framework and
the Common.Logging facade.
Inheritance
Inherited Members
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 |
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);