Table of Contents

Class Logger

Namespace
MonkeyLoader.Logging
Assembly
MonkeyLoader.dll

Contains the logging functionality mods and patchers can use to log messages to game-specific channels.

public sealed class Logger
Inheritance
Logger
Inherited Members

Constructors

Logger(Logger, string)

Creates a new logger instance owned by the same MonkeyLoggingController.

public Logger(Logger logger, string extraIdentifier)

Parameters

logger Logger

The logger instance to copy.

extraIdentifier string

The extra identifier to append to the logger's.

Properties

Controller

Gets the LoggingController instance that this logger works for.

public LoggingController Controller { get; }

Property Value

LoggingController

Identifier

Gets the identifier that's added to this logger's messages to determine the source.

public string Identifier { get; }

Property Value

string

Level

Gets the current LoggingLevel used to filter requests, determined by the LoggingController instance this logger works for.

public LoggingLevel Level { get; }

Property Value

LoggingLevel

Methods

Debug(IEnumerable<Func<object>>)

Logs events considered to be useful during debugging when more granular information is needed.

public void Debug(IEnumerable<Func<object>> messageProducers)

Parameters

messageProducers IEnumerable<Func<object>>

The producers to log as individual lines if possible.

Debug(IEnumerable<object>)

Logs events considered to be useful during debugging when more granular information is needed.

public void Debug(IEnumerable<object> messages)

Parameters

messages IEnumerable<object>

The messages to log as individual lines if possible.

Debug(Func<object>)

Logs events considered to be useful during debugging when more granular information is needed.

public void Debug(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Debug(params Func<object>[])

Logs events considered to be useful during debugging when more granular information is needed.

public void Debug(params Func<object>[] messageProducers)

Parameters

messageProducers Func<object>[]

The producers to log as individual lines if possible.

Error(IEnumerable<Func<object>>)

Logs that one or more functionalities are not working, preventing some from working correctly.

public void Error(IEnumerable<Func<object>> messageProducers)

Parameters

messageProducers IEnumerable<Func<object>>

The producers to log as individual lines if possible.

Error(IEnumerable<object>)

Logs that one or more functionalities are not working, preventing some from working correctly.

public void Error(IEnumerable<object> messages)

Parameters

messages IEnumerable<object>

The messages to log as individual lines if possible.

Error(Func<object>)

Logs that one or more functionalities are not working, preventing some from working correctly.

public void Error(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Error(params Func<object>[])

Logs that one or more functionalities are not working, preventing some from working correctly.

public void Error(params Func<object>[] messageProducers)

Parameters

messageProducers Func<object>[]

The producers to log as individual lines if possible.

Fatal(IEnumerable<Func<object>>)

Logs that one or more key functionalities, or the whole system isn't working.

public void Fatal(IEnumerable<Func<object>> messageProducers)

Parameters

messageProducers IEnumerable<Func<object>>

The producers to log as individual lines if possible.

Fatal(IEnumerable<object>)

Logs that one or more key functionalities, or the whole system isn't working.

public void Fatal(IEnumerable<object> messages)

Parameters

messages IEnumerable<object>

The messages to log as individual lines if possible.

Fatal(Func<object>)

Logs that one or more key functionalities, or the whole system isn't working.

public void Fatal(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Fatal(params Func<object>[])

Logs that one or more key functionalities, or the whole system isn't working.

public void Fatal(params Func<object>[] messageProducers)

Parameters

messageProducers Func<object>[]

The producers to log as individual lines if possible.

Flush()

Flushes any not yet fully logged messages.

public void Flush()

Info(IEnumerable<Func<object>>)

Logs that something happened, which is purely informative and can be ignored during normal use.

public void Info(IEnumerable<Func<object>> messageProducers)

Parameters

messageProducers IEnumerable<Func<object>>

The producers to log as individual lines if possible.

Info(IEnumerable<object>)

Logs that something happened, which is purely informative and can be ignored during normal use.

public void Info(IEnumerable<object> messages)

Parameters

messages IEnumerable<object>

The messages to log as individual lines if possible.

Info(Func<object>)

Logs that something happened, which is purely informative and can be ignored during normal use.

public void Info(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Info(params Func<object>[])

Logs that something happened, which is purely informative and can be ignored during normal use.

public void Info(params Func<object>[] messageProducers)

Parameters

messageProducers Func<object>[]

The producers to log as individual lines if possible.

ShouldLog(LoggingLevel)

Determines whether the given LoggingLevel should be logged at the current Level.

public bool ShouldLog(LoggingLevel level)

Parameters

level LoggingLevel

The LoggingLevel to check.

Returns

bool

true if the given LoggingLevel should be logged right now; otherwise, false.

Trace(IEnumerable<Func<object>>)

Logs step by step execution of code that can be ignored during standard operation, but may be useful during extended debugging sessions.

public void Trace(IEnumerable<Func<object>> messageProducers)

Parameters

messageProducers IEnumerable<Func<object>>

The producers to log as individual lines if possible.

Trace(IEnumerable<object>)

Logs step by step execution of code that can be ignored during standard operation, but may be useful during extended debugging sessions.

public void Trace(IEnumerable<object> messages)

Parameters

messages IEnumerable<object>

The messages to log as individual lines if possible.

Trace(Func<object>)

Logs step by step execution of code that can be ignored during standard operation, but may be useful during extended debugging sessions.

public void Trace(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Trace(params Func<object>[])

Logs step by step execution of code that can be ignored during standard operation, but may be useful during extended debugging sessions.

public void Trace(params Func<object>[] messageProducers)

Parameters

messageProducers Func<object>[]

The producers to log as individual lines if possible.

Warn(IEnumerable<Func<object>>)

Logs that unexpected behavior happened, but work is continuing and the key functionalities are operating as expected.

public void Warn(IEnumerable<Func<object>> messageProducers)

Parameters

messageProducers IEnumerable<Func<object>>

The producers to log as individual lines if possible.

Warn(IEnumerable<object>)

Logs that unexpected behavior happened, but work is continuing and the key functionalities are operating as expected.

public void Warn(IEnumerable<object> messages)

Parameters

messages IEnumerable<object>

The messages to log as individual lines if possible.

Warn(Func<object>)

Logs that unexpected behavior happened, but work is continuing and the key functionalities are operating as expected.

public void Warn(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Warn(params Func<object>[])

Logs that unexpected behavior happened, but work is continuing and the key functionalities are operating as expected.

public void Warn(params Func<object>[] messageProducers)

Parameters

messageProducers Func<object>[]

The producers to log as individual lines if possible.