Class StandardLogger
The default (and standard) Logger implementation.
Inherited Members
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 SourceConsoleWriter
The TextWriter for writing directly to the console window, or stdout if no window open.
Declaration
public static TextWriter ConsoleWriter { get; }
Property Value
Type | Description |
---|---|
TextWriter | a TextWriter for the current primary text output |
IsOnLoggerThread
Whether or not the calling thread is the logger thread.
Declaration
public static bool IsOnLoggerThread { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the current thread is the logger thread, false otherwise |
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 SourceAddPrinter(LogPrinter)
Adds a log printer to the logger.
Declaration
public void AddPrinter(LogPrinter printer)
Parameters
Type | Name | Description |
---|---|---|
LogPrinter | printer | the printer to add |
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 |
---|---|---|
String | message | the message to log |
Overrides
See Also
| Improve this Doc View SourceLog(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 |
String | message | the message to log |