Class PreloaderConsoleListener

Log listener that listens to logs during preloading time and buffers messages for output in Unity logs later.

Inheritance
System.Object PreloaderConsoleListener
Implements
ILogListener System.IDisposable
Inherited Members
System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace: BepInEx.Preloader.Core.Logging
Assembly: BepInEx.Preloader.Core.dll
Syntax
public class PreloaderConsoleListener : ILogListener, IDisposable

Properties

LogEvents

A list of all LogEventArgs objects that this listener has received.

Declaration
public static List<LogEventArgs> LogEvents { get; }
Property Value
Type Description
System.Collections.Generic.List<LogEventArgs>

LogLevelFilter

What log levels the listener preliminarily wants.

Declaration
public LogLevel LogLevelFilter { get; }
Property Value
Type Description
LogLevel
Remarks

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 LogEvent(Object, LogEventArgs) whether the messages are going to be processed or discarded.

Methods

Dispose()

Declaration
public void Dispose()

LogEvent(Object, LogEventArgs)

Handle an incoming log event.

Declaration
public void LogEvent(object sender, LogEventArgs eventArgs)
Parameters
Type Name Description
System.Object sender

Log source that sent the event. Don't use; instead use Source

LogEventArgs eventArgs

Information about the log message.

Implements

ILogListener
System.IDisposable