ManualLogSource Class
Definition
Section titled “Definition”A generic, multi-purpose log source. Exposes simple API to manually emit logs.
public class ManualLogSource : ILogSource, IDisposable
Inheritance object
Implements ILogSource, IDisposable
Constructors
Section titled “Constructors”ManualLogSource(string)
Section titled “ManualLogSource(string)”Creates a manual log source.
public ManualLogSource(string sourceName)
Parameters
Section titled “Parameters”sourceName
string
Name of the log source.
Properties
Section titled “Properties”SourceName
Section titled “SourceName”Name of the log source.
public string SourceName { get; }
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Log(LogLevel, object)
Section titled “Log(LogLevel, object)”Logs a message with the specified log level.
public void Log(LogLevel level, object data)
Parameters
Section titled “Parameters”level
LogLevel
Log levels to attach to the message. Multiple can be used with bitwise ORing.
data
object
Data to log.
Log(LogLevel, BepInExLogInterpolatedStringHandler)
Section titled “Log(LogLevel, BepInExLogInterpolatedStringHandler)”Logs an interpolated string with the specified log level.
public void Log(LogLevel level, BepInExLogInterpolatedStringHandler logHandler)
Parameters
Section titled “Parameters”level
LogLevel
Log levels to attach to the message. Multiple can be used with bitwise ORing.
logHandler
BepInExLogInterpolatedStringHandler
Handler for the interpolated string.
LogFatal(object)
Section titled “LogFatal(object)”Logs a message with Fatal level.
public void LogFatal(object data)
Parameters
Section titled “Parameters”data
object
Data to log.
LogFatal(BepInExFatalLogInterpolatedStringHandler)
Section titled “LogFatal(BepInExFatalLogInterpolatedStringHandler)”Logs an interpolated string with Fatal level.
public void LogFatal(BepInExFatalLogInterpolatedStringHandler logHandler)
Parameters
Section titled “Parameters”logHandler
BepInExFatalLogInterpolatedStringHandler
Handler for the interpolated string.
LogError(object)
Section titled “LogError(object)”Logs a message with Error level.
public void LogError(object data)
Parameters
Section titled “Parameters”data
object
Data to log.
LogError(BepInExErrorLogInterpolatedStringHandler)
Section titled “LogError(BepInExErrorLogInterpolatedStringHandler)”Logs an interpolated string with Error level.
public void LogError(BepInExErrorLogInterpolatedStringHandler logHandler)
Parameters
Section titled “Parameters”logHandler
BepInExErrorLogInterpolatedStringHandler
Handler for the interpolated string.
LogWarning(object)
Section titled “LogWarning(object)”Logs a message with Warning level.
public void LogWarning(object data)
Parameters
Section titled “Parameters”data
object
Data to log.
LogWarning(BepInExWarningLogInterpolatedStringHandler)
Section titled “LogWarning(BepInExWarningLogInterpolatedStringHandler)”Logs an interpolated string with Warning level.
public void LogWarning(BepInExWarningLogInterpolatedStringHandler logHandler)
Parameters
Section titled “Parameters”logHandler
BepInExWarningLogInterpolatedStringHandler
Handler for the interpolated string.
LogMessage(object)
Section titled “LogMessage(object)”Logs a message with Message level.
public void LogMessage(object data)
Parameters
Section titled “Parameters”data
object
Data to log.
LogMessage(BepInExMessageLogInterpolatedStringHandler)
Section titled “LogMessage(BepInExMessageLogInterpolatedStringHandler)”Logs an interpolated string with Message level.
public void LogMessage(BepInExMessageLogInterpolatedStringHandler logHandler)
Parameters
Section titled “Parameters”logHandler
BepInExMessageLogInterpolatedStringHandler
Handler for the interpolated string.
LogInfo(object)
Section titled “LogInfo(object)”Logs a message with Info level.
public void LogInfo(object data)
Parameters
Section titled “Parameters”data
object
Data to log.
LogInfo(BepInExInfoLogInterpolatedStringHandler)
Section titled “LogInfo(BepInExInfoLogInterpolatedStringHandler)”Logs an interpolated string with Info level.
public void LogInfo(BepInExInfoLogInterpolatedStringHandler logHandler)
Parameters
Section titled “Parameters”logHandler
BepInExInfoLogInterpolatedStringHandler
Handler for the interpolated string.
LogDebug(object)
Section titled “LogDebug(object)”Logs a message with Debug level.
public void LogDebug(object data)
Parameters
Section titled “Parameters”data
object
Data to log.
LogDebug(BepInExDebugLogInterpolatedStringHandler)
Section titled “LogDebug(BepInExDebugLogInterpolatedStringHandler)”Logs an interpolated string with Debug level.
public void LogDebug(BepInExDebugLogInterpolatedStringHandler logHandler)
Parameters
Section titled “Parameters”logHandler
BepInExDebugLogInterpolatedStringHandler
Handler for the interpolated string.
Events
Section titled “Events”LogEvent
Section titled “LogEvent”Event that sends the log message. Call System.EventHandler.Invoke(System.Object%2cSystem.EventArgs)
to send a log message.
public event EventHandler<LogEventArgs> LogEvent