Class DiskLogListener
Logs entries using Unity specific outputs.
Namespace: BepInEx.Logging
Assembly: BepInEx.dll
Syntax
public class DiskLogListener : ILogListener, IDisposable
Constructors
Creates a new disk log listener.
Declaration
public DiskLogListener(string localPath, LogLevel displayedLogLevel = LogLevel.Info, bool appendLog = false, bool includeUnityLog = false)
Parameters
Type | Name | Description |
---|---|---|
System.String |
localPath |
Path to the log. |
LogLevel |
displayedLogLevel |
Log levels to display. |
System.Boolean |
appendLog |
Whether to append logs to an already existing log file. |
System.Boolean |
includeUnityLog |
Whether to include Unity log into the disk log. |
Properties
Log levels to display.
Declaration
public LogLevel DisplayedLogLevel { get; set; }
Property Value
Type | Description |
---|---|
LogLevel |
Timer for flushing the logs to a file.
Declaration
public Timer FlushTimer { get; protected set; }
Property Value
Type | Description |
---|---|
System.Threading.Timer |
Writer for the disk log.
Declaration
public TextWriter LogWriter { get; protected set; }
Property Value
Type | Description |
---|---|
System.IO.TextWriter |
Whether to write Unity log messages to disk log.
Declaration
public bool WriteFromUnityLog { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Declaration
public void Dispose()
Disposes of Disk logger
Declaration
protected void Finalize()
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
System.IDisposable