Search Results for

    Show / Hide Table of Contents

    Class StandardLogger

    The default (and standard) Logger implementation.

    Inheritance
    System.Object
    Logger
    StandardLogger
    Inherited Members
    Logger.LogFormat
    Logger.Log(Logger.Level, Exception)
    Logger.Trace(String)
    Logger.Trace(Exception)
    Logger.Debug(Exception)
    Logger.Info(String)
    Logger.Info(Exception)
    Logger.Notice(String)
    Logger.Notice(Exception)
    Logger.Warn(String)
    Logger.Warn(Exception)
    Logger.Error(String)
    Logger.Error(Exception)
    Logger.Critical(String)
    Logger.Critical(Exception)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: IPA.Logging
    Assembly: IPA.Loader.dll
    Syntax
    public class StandardLogger : Logger
    Remarks

    StandardLogger uses a multi-threaded approach to logging. All actual I/O is done on another thread, where all messaged are guaranteed to be logged in the order they appeared. It is up to the printers to format them.

    This logger supports child loggers. Use GetChildLogger(Logger, String) to safely get a child. The modification of printers on a parent are reflected down the chain.

    Properties

    | Improve this Doc View Source

    ConsoleWriter

    The System.IO.TextWriter for writing directly to the console window, or stdout if no window open.

    Declaration
    public static TextWriter ConsoleWriter { get; }
    Property Value
    Type Description
    System.IO.TextWriter

    a System.IO.TextWriter for the current primary text output

    | Improve this Doc View Source

    IsOnLoggerThread

    Whether or not the calling thread is the logger thread.

    Declaration
    public static bool IsOnLoggerThread { get; }
    Property Value
    Type Description
    System.Boolean

    true if the current thread is the logger thread, false otherwise

    | Improve this Doc View Source

    PrintFilter

    All levels defined by this filter will be sent to loggers. All others will be ignored.

    Declaration
    public static Logger.LogLevel PrintFilter { get; }
    Property Value
    Type Description
    Logger.LogLevel

    the global filter level

    Methods

    | Improve this Doc View Source

    AddPrinter(LogPrinter)

    Adds a log printer to the logger.

    Declaration
    public void AddPrinter(LogPrinter printer)
    Parameters
    Type Name Description
    LogPrinter printer

    the printer to add

    | Improve this Doc View Source

    Debug(String)

    An override to Debug(String) which shows the method that called it.

    Declaration
    public override void Debug(string message)
    Parameters
    Type Name Description
    System.String message

    the message to log

    Overrides
    Logger.Debug(String)
    See Also
    Log(Logger.Level, System.String)
    | Improve this Doc View Source

    Log(Logger.Level, String)

    Logs a specific message at a given level.

    Declaration
    public override void Log(Logger.Level level, string message)
    Parameters
    Type Name Description
    Logger.Level level

    the message level

    System.String message

    the message to log

    Overrides
    Logger.Log(Logger.Level, String)

    Extension Methods

    LoggerExtensions.GetChildLogger(Logger, String)
    ReflectionUtil.SetField<T, U>(T, String, U)
    ReflectionUtil.GetField<U, T>(T, String)
    ReflectionUtil.SetProperty<T, U>(T, String, U)
    ReflectionUtil.GetProperty<U, T>(T, String)
    ReflectionUtil.InvokeMethod<U, T>(T, String, Object[])
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX