Skip to content

ConsoleLogListener Class

Logs entries using a console spawned by BepInEx.

C#
public class ConsoleLogListener : ILogListener, IDisposable

Inheritance object

Implements ILogListener, IDisposable

C#
protected static readonly ConfigEntry<LogLevel> ConfigConsoleDisplayedLevel

What log levels the listener preliminarily wants.

C#
public LogLevel LogLevelFilter { get; }

The filter is used to more efficiently discard log messages that aren’t being listened to. As such, the filter should represent the log levels that the listener will always want to process. It is up to the the implementation of BepInEx.Logging.ILogListener.LogEvent(System.Object%2cBepInEx.Logging.LogEventArgs) whether the messages are going to be processed or discarded.

Handle an incoming log event.

C#
public void LogEvent(object sender, LogEventArgs eventArgs)

sender object
Log source that sent the event. Don’t use; instead use

eventArgs LogEventArgs
Information about the log message.

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

C#
public void Dispose()