Table of Contents

Class MulticastLoggingHandler

Namespace
MonkeyLoader.Logging
Assembly
MonkeyLoader.dll

Implements an LoggingHandler that can delegate messages to multiple other handlers.

public sealed class MulticastLoggingHandler : LoggingHandler, IEnumerable<LoggingHandler>, IEnumerable
Inheritance
MulticastLoggingHandler
Implements
Inherited Members
Extension Methods

Constructors

MulticastLoggingHandler(params LoggingHandler[])

Creates a new multicast logging handler with the given handlers to delegate messages to.

public MulticastLoggingHandler(params LoggingHandler[] loggingHandlers)

Parameters

loggingHandlers LoggingHandler[]

The logging handlers to delegate messages to.

MulticastLoggingHandler(IEnumerable<LoggingHandler>)

Creates a new multicast logging handler with the given handlers to delegate messages to.

public MulticastLoggingHandler(IEnumerable<LoggingHandler> loggingHandlers)

Parameters

loggingHandlers IEnumerable<LoggingHandler>

The logging handlers to delegate messages to.

Properties

Connected

Gets whether this logging handler has somewhere to log.

public override bool Connected { get; }

Property Value

bool

ConnectedHandlers

Gets the currently connected logging handlers that this one delegates messages to.

public IEnumerable<LoggingHandler> ConnectedHandlers { get; }

Property Value

IEnumerable<LoggingHandler>

Count

Gets the number of other handlers that messages are delegated to.

public int Count { get; }

Property Value

int

LoggingHandlers

Gets all logging handlers that this one delegates messages to.

public IEnumerable<LoggingHandler> LoggingHandlers { get; }

Property Value

IEnumerable<LoggingHandler>

Methods

Debug(Func<object>)

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

public override void Debug(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.

Error(Func<object>)

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

public override 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 override 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 override void Flush()

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<LoggingHandler> GetEnumerator()

Returns

IEnumerator<LoggingHandler>

An enumerator that can be used to iterate through the collection.

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 override 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 override 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 override void Warn(Func<object> messageProducer)

Parameters

messageProducer Func<object>

The producer to log if possible.