Skip to main content

Interface IPluginLog

An opinionated service to handle logging for plugins.

Assembly: Dalamud.dll
View Source
Declaration
public interface IPluginLog

Properties

MinimumLogLevel

Gets or sets the minimum log level that will be recorded from this plugin to Dalamud's logs. This may be set by either the plugin or by Dalamud itself.

View Source
Declaration
LogEventLevel MinimumLogLevel { get; set; }

Methods

Fatal(string, params object[])

Log a Serilog.Events.LogEventLevel.Fatal message to the Dalamud log for this plugin. This log level should be used primarily for unrecoverable errors or critical faults in a plugin.

View Source
Declaration
void Fatal(string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Fatal(Exception?, string, params object[])

Log a Serilog.Events.LogEventLevel.Fatal message to the Dalamud log for this plugin. This log level should be used primarily for unrecoverable errors or critical faults in a plugin.

View Source
Declaration
void Fatal(Exception? exception, string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.ExceptionexceptionAn (optional) exception that should be recorded alongside this event.
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Error(string, params object[])

Log a Serilog.Events.LogEventLevel.Error message to the Dalamud log for this plugin. This log level should be used for recoverable errors or faults that impact plugin functionality.

View Source
Declaration
void Error(string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Error(Exception?, string, params object[])

Log a Serilog.Events.LogEventLevel.Error message to the Dalamud log for this plugin. This log level should be used for recoverable errors or faults that impact plugin functionality.

View Source
Declaration
void Error(Exception? exception, string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.ExceptionexceptionAn (optional) exception that should be recorded alongside this event.
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Warning(string, params object[])

Log a Serilog.Events.LogEventLevel.Warning message to the Dalamud log for this plugin. This log level should be used for user error, potential problems, or high-importance messages that should be logged.

View Source
Declaration
void Warning(string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Warning(Exception?, string, params object[])

Log a Serilog.Events.LogEventLevel.Warning message to the Dalamud log for this plugin. This log level should be used for user error, potential problems, or high-importance messages that should be logged.

View Source
Declaration
void Warning(Exception? exception, string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.ExceptionexceptionAn (optional) exception that should be recorded alongside this event.
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Information(string, params object[])

Log an Serilog.Events.LogEventLevel.Information message to the Dalamud log for this plugin. This log level should be used for general plugin operations and other relevant information to track a plugin's behavior.

View Source
Declaration
void Information(string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Information(Exception?, string, params object[])

Log an Serilog.Events.LogEventLevel.Information message to the Dalamud log for this plugin. This log level should be used for general plugin operations and other relevant information to track a plugin's behavior.

View Source
Declaration
void Information(Exception? exception, string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.ExceptionexceptionAn (optional) exception that should be recorded alongside this event.
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Info(string, params object[])

Log an Serilog.Events.LogEventLevel.Information message to the Dalamud log for this plugin. This log level should be used for general plugin operations and other relevant information to track a plugin's behavior.

View Source
Declaration
void Info(string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Info(Exception?, string, params object[])

Log an Serilog.Events.LogEventLevel.Information message to the Dalamud log for this plugin. This log level should be used for general plugin operations and other relevant information to track a plugin's behavior.

View Source
Declaration
void Info(Exception? exception, string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.ExceptionexceptionAn (optional) exception that should be recorded alongside this event.
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Debug(string, params object[])

Log a Serilog.Events.LogEventLevel.Debug message to the Dalamud log for this plugin. This log level should be used for messages or information that aid with debugging or tracing a plugin's operations, but should not be recorded unless requested.

View Source
Declaration
void Debug(string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Debug(Exception?, string, params object[])

Log a Serilog.Events.LogEventLevel.Debug message to the Dalamud log for this plugin. This log level should be used for messages or information that aid with debugging or tracing a plugin's operations, but should not be recorded unless requested.

View Source
Declaration
void Debug(Exception? exception, string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.ExceptionexceptionAn (optional) exception that should be recorded alongside this event.
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Verbose(string, params object[])

Log a Serilog.Events.LogEventLevel.Verbose message to the Dalamud log for this plugin. This log level is intended almost primarily for development purposes and detailed tracing of a plugin's operations. Verbose logs should not be used to expose information useful for support purposes.

View Source
Declaration
void Verbose(string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Verbose(Exception?, string, params object[])

Log a Serilog.Events.LogEventLevel.Verbose message to the Dalamud log for this plugin. This log level is intended almost primarily for development purposes and detailed tracing of a plugin's operations. Verbose logs should not be used to expose information useful for support purposes.

View Source
Declaration
void Verbose(Exception? exception, string messageTemplate, params object[] values)
Parameters
TypeNameDescription
System.ExceptionexceptionAn (optional) exception that should be recorded alongside this event.
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.

Write(LogEventLevel, Exception?, string, params object[])

Write a raw log event to the plugin's log. Used for interoperability with other log systems, as well as advanced use cases.

View Source
Declaration
void Write(LogEventLevel level, Exception? exception, string messageTemplate, params object[] values)
Parameters
TypeNameDescription
Serilog.Events.LogEventLevellevelThe log level for this event.
System.ExceptionexceptionAn (optional) exception that should be recorded alongside this event.
System.StringmessageTemplateMessage template describing the event.
System.Object[]valuesObjects positionally formatted into the message template.