LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Interface ILogAdapter

    An abstraction of some mechanism for producing log output.

    Namespace: LaunchDarkly.Logging
    Assembly: LaunchDarkly.Logging.dll
    Syntax
    public interface ILogAdapter
    Remarks

    Any LaunchDarkly library that can generate log output through LaunchDarkly.Logging has a configuration option of type ILogAdapter, which defines the implementation details of what to do with the log output. Built-in basic implementations are available through the Logs class, and adapters that delegate to other logging frameworks can be provided by other LaunchDarkly packages or by the application.

    The basic model is that whatever component will be writing to the logs will define at least one name for an output channel. The adapter's NewChannel(string) method takes a name and returns a low-level IChannel implementation that accepts log messages for any LogLevel; this is wrapped in the standard Logger class, which is what the rest of the LaunchDarkly library code interacts with.

    Applications should not need to interact directly with ILogAdapter, beyond the initial configuration step of choosing which one to use.

    Methods

    NewChannel(string)

    The logger calls this method to obtain a named output channel.

    Declaration
    IChannel NewChannel(string name)
    Parameters
    Type Name Description
    string name

    an identifying name

    Returns
    Type Description
    IChannel

    an implementation of IChannel

    Remarks

    The name will be included in all log output for this channel. Channels are meant to be retained and reused by the components they belong to, so the ILogAdapter does not need to cache them.

    Extension Methods

    ILogAdapterExtensions.Level(ILogAdapter, LogLevel)
    ILogAdapterExtensions.Logger(ILogAdapter, string)
    In this article
    Back to top Generated by DocFX