Class Logger

Handles pub-sub event marshalling across all log listeners and sources.

Inheritance
System.Object Logger
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.Logging
Assembly: BepInEx.Core.dll
Syntax
public static class Logger

Properties

ListenedLogLevels

Log levels that are currently listened to by at least one listener.

Declaration
public static LogLevel ListenedLogLevels { get; }
Property Value
Type Description
LogLevel

Listeners

Collection of all log listeners that receive log events.

Declaration
public static ICollection<ILogListener> Listeners { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<ILogListener>

Sources

Collection of all log source that output log events.

Declaration
public static ICollection<ILogSource> Sources { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<ILogSource>

Methods

CreateLogSource(String)

Creates a new log source with a name and attaches it to Sources.

Declaration
public static ManualLogSource CreateLogSource(string sourceName)
Parameters
Type Name Description
System.String sourceName

Name of the log source to create.

Returns
Type Description
ManualLogSource

An instance of ManualLogSource that allows to write logs.