Table of Contents

Class LoggingHandler

Namespace
MonkeyLoader.Logging
Assembly
MonkeyLoader.dll

Defines the interface used by the Logger class to send its logging requests to the game-specific channels.

public abstract class LoggingHandler
Inheritance
LoggingHandler
Derived
Inherited Members

Properties

Connected

Gets whether this logging handler has somewhere to log.

public abstract bool Connected { get; }

Property Value

bool

Methods

Debug(Func<object>)

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

public abstract void Debug(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Error(Func<object>)

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

public abstract void Error(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Fatal(Func<object>)

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

public abstract void Fatal(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Flush()

Attempts to flush any not yet fully logged messages.

public abstract void Flush()

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Info(Func<object>)

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

public abstract void Info(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log 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 abstract void Trace(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Warn(Func<object>)

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

public abstract void Warn(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Operators

operator +(LoggingHandler?, LoggingHandler?)

Adds the right logging handler(s) to the left one(s).
Uses MulticastLoggingHandlers.

public static LoggingHandler operator +(LoggingHandler? left, LoggingHandler? right)

Parameters

left LoggingHandler

The left logging handler(s).

right LoggingHandler

The right logging handler(s).

Returns

LoggingHandler

A new logging handler containing the combined handler(s).

operator ==(LoggingHandler?, LoggingHandler?)

Determines whether two LoggingHandlers are considered equal.

public static bool operator ==(LoggingHandler? left, LoggingHandler? right)

Parameters

left LoggingHandler

The first handler.

right LoggingHandler

The second handler.

Returns

bool

true if they're considered equal; otherwise false.

operator !=(LoggingHandler?, LoggingHandler?)

Determines whether two LoggingHandlers are considered unequal.

public static bool operator !=(LoggingHandler? left, LoggingHandler? right)

Parameters

left LoggingHandler

The first handler.

right LoggingHandler

The second handler.

Returns

bool

true if they're considered unequal; otherwise false.

operator -(LoggingHandler?, LoggingHandler?)

Removes the right logging handler(s) from the left one(s).
Uses MulticastLoggingHandlers.

public static LoggingHandler operator -(LoggingHandler? left, LoggingHandler? right)

Parameters

left LoggingHandler

The left logging handler(s).

right LoggingHandler

The right logging handler(s).

Returns

LoggingHandler

A new logging handler containing the remaining handler(s).