LaunchDarkly Logging API for .NET - Microsoft.Extensions.Logging Adapter
Search Results for

    Show / Hide Table of Contents

    Class LdMicrosoftLogging

    Provides integration between the LaunchDarkly SDK's logging framework and the Microsoft.Extensions.Logging API.

    Inheritance
    object
    LdMicrosoftLogging
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LaunchDarkly.Logging
    Assembly: LaunchDarkly.Logging.Microsoft.dll
    Syntax
    public static class LdMicrosoftLogging

    Methods

    | Edit this page View Source

    Adapter(ILoggerFactory)

    A logging implementation that delegates to the Microsoft.Extensions.Logging framework.

    Declaration
    public static ILogAdapter Adapter(ILoggerFactory loggerFactory)
    Parameters
    Type Name Description
    ILoggerFactory loggerFactory

    the factory object for Microsoft logging

    Returns
    Type Description
    ILogAdapter

    a logging adapter

    Remarks

    This method is only available when your target framework is .NET Core. It causes the LaunchDarkly.Logging APIs to delegate to the Microsoft.Extensions.Logging framework. The ILoggerFactory is the main configuration object for Microsoft.Extensions.Logging; application code can construct it programmatically, or can obtain it by dependency injection. For more information, see Logging in .NET Core and ASP.NET Core.

    The Microsoft.Extensions.Logging framework has its own mechanisms for filtering log output by level or other criteria. If you add a level filter with LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter, LaunchDarkly.Logging.LogLevel), it will filter out messages below that level before they reach the Microsoft logger.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX