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.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

PrintFilter

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

Declaration
public static Logger.LogLevel PrintFilter { get; set; }
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.SetPrivateField(Object, String, Object)
ReflectionUtil.GetPrivateField<T>(Object, String)
ReflectionUtil.SetPrivateProperty(Object, String, Object)
ReflectionUtil.InvokePrivateMethod(Object, String, Object[])
ReflectionUtil.InvokePrivateMethod<T>(Object, String, Object[])
  • Improve this Doc
  • View Source
Back to top Generated by DocFX