LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Class SimpleLogging

    A basic logging implementation that sends preformatted output one line at a time to a TextWriter, or to any arbitrary output function.

    Inheritance
    object
    SimpleLogging
    Implements
    ILogAdapter
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LaunchDarkly.Logging
    Assembly: LaunchDarkly.Logging.dll
    Syntax
    public class SimpleLogging : ILogAdapter
    Remarks

    This is the configurable adapter that is returned by ToConsole, ToWriter(TextWriter), and ToMethod(Action<string>). You can specify additional options using the methods of this class, such as DateFormat(string).

    Fields

    DefaultDateFormat

    The default format for log timestamps.

    Declaration
    public const string DefaultDateFormat = "yyyy-MM-dd HH:mm:ss.fff zzz"
    Field Value
    Type Description
    string

    Methods

    DateFormat(string)

    Specifies the format for date/timestamps, in the syntax used by ToString(string).

    Declaration
    public SimpleLogging DateFormat(string dateFormat)
    Parameters
    Type Name Description
    string dateFormat

    the date/time format, or null to omit the date and time

    Returns
    Type Description
    SimpleLogging

    an adapter with the specified configuration

    Remarks

    This method does not modify the current instance, but returns a new adapter based on this one.

    NewChannel(string)

    Called internally by the logging framework.

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

    the channel name

    Returns
    Type Description
    IChannel

    a new channel

    Implements

    ILogAdapter

    Extension Methods

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