Class Logger
Handles pub-sub event marshalling across all log listeners and sources.
Namespace: BepInEx.Logging
Assembly: BepInEx.Core.dll
Syntax
public static class Logger
Properties
Log levels that are currently listened to by at least one listener.
Declaration
public static LogLevel ListenedLogLevels { get; }
Property Value
Type | Description |
---|---|
LogLevel |
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> |
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
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. |