Table of Contents

Class LoggingController

Namespace
MonkeyLoader.Logging
Assembly
MonkeyLoader.dll

Manages the connection between LoggingHandlers and Loggers.

public sealed class LoggingController
Inheritance
LoggingController
Inherited Members

Constructors

LoggingController(string)

Creates a new LoggingHandler to control Loggers.

public LoggingController(string id)

Parameters

id string

The controller's id.

Properties

AutoFlush

Gets or sets whether this logger will automatically trigger flushing of messages.

public bool AutoFlush { get; set; }

Property Value

bool

FlushTimeout

Gets or sets the time to wait for more logging before flushing after non-critical messages.

public TimeSpan FlushTimeout { get; set; }

Property Value

TimeSpan

Remarks

Default: 2 seconds.

Handler

Gets the LoggingHandler used to send logging requests to the game-specific channels.
Messages get queued when it isn't connected and they would otherwise have been logged.

public LoggingHandler Handler { get; set; }

Property Value

LoggingHandler

Id

Gets this controller's id.

public string Id { get; }

Property Value

string

Level

Gets or sets the current Level used to filter requests on Logger instances.

public LoggingLevel Level { get; set; }

Property Value

LoggingLevel

Remarks

Default: Info.

Methods

Flush()

Flushes any not yet fully logged messages.

public void Flush()

ShouldLog(LoggingLevel)

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

public bool ShouldLog(LoggingLevel level)

Parameters

level LoggingLevel

The Level to check.

Returns

bool

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