Unosquare
    Show / Hide Table of Contents

    Class TextLogger

    Use this class for text-based logger.

    Inheritance
    Object
    TextLogger
    ConsoleLogger
    DebugLogger
    FileLogger
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Swan.Logging
    Syntax
    public abstract class TextLogger

    Properties

    LoggingTimeFormat

    Gets or sets the logging time format. set to null or empty to prevent output.

    Declaration
    public static string LoggingTimeFormat { get; set; }
    Property Value
    Type Description
    String

    The logging time format.

    Methods

    GetOutputAndColor(LogMessageReceivedEventArgs)

    Gets the color of the output of the message (the output message has a new line char in the end).

    Declaration
    protected (string outputMessage, ConsoleColor color) GetOutputAndColor(LogMessageReceivedEventArgs logEvent)
    Parameters
    Type Name Description
    LogMessageReceivedEventArgs logEvent

    The LogMessageReceivedEventArgs instance containing the event data.

    Returns
    Type Description
    ValueTuple<String, ConsoleColor>

    The output message formatted and the color of the console to be used.

    Comments

    Back to top Copyright © 2017-2019 Unosquare