Interface IPluginLog
An opinionated service to handle logging for plugins.
Assembly: Dalamud.dll
public interface IPluginLog : IDalamudService
Properties
Logger
Gets a Serilog ILogger instance for this plugin. This is the entrypoint for plugins that wish to use more advanced logging functionality.
ILogger Logger { get; }
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.
LogEventLevel MinimumLogLevel { get; set; }
Remarks
Defaults to Serilog.Events.LogEventLevel.Debug for downloaded plugins, and Serilog.Events.LogEventLevel.Verbose
for dev plugins.
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.
void Fatal(string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Fatal(Exception? exception, string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.Exception | exception | An (optional) exception that should be recorded alongside this event. |
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Error(string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Error(Exception? exception, string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.Exception | exception | An (optional) exception that should be recorded alongside this event. |
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Warning(string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Warning(Exception? exception, string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.Exception | exception | An (optional) exception that should be recorded alongside this event. |
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Information(string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Information(Exception? exception, string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.Exception | exception | An (optional) exception that should be recorded alongside this event. |
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Info(string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Info(Exception? exception, string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.Exception | exception | An (optional) exception that should be recorded alongside this event. |
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects 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.
void Debug(string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects positionally formatted into the message template. |
Remarks
By default, this log level is below the default log level of Dalamud. Messages logged at this level will not be recorded unless the global log level is specifically set to Debug or lower. If information should be generally or easily accessible for support purposes without the user taking additional action, consider using the Information level instead. Developers should not use this log level where it can be triggered on a per-frame basis.
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.
void Debug(Exception? exception, string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.Exception | exception | An (optional) exception that should be recorded alongside this event. |
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects positionally formatted into the message template. |
Remarks
By default, this log level is below the default log level of Dalamud. Messages logged at this level will not be recorded unless the global log level is specifically set to Debug or lower. If information should be generally or easily accessible for support purposes without the user taking additional action, consider using the Information level instead. Developers should not use this log level where it can be triggered on a per-frame basis.
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.
void Verbose(string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects positionally formatted into the message template. |
Remarks
By default, this log level is below the default log level of Dalamud. Messages logged at this level will not be
recorded unless the global log level is specifically set to Verbose. Release plugins must also set the
Dalamud.Plugin.Services.IPluginLog.MinimumLogLevel to Serilog.Events.LogEventLevel.Verbose to use this level, and should only do so
upon specific user request (e.g. a "Enable Troubleshooting Logs" button).
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.
void Verbose(Exception? exception, string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
System.Exception | exception | An (optional) exception that should be recorded alongside this event. |
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects positionally formatted into the message template. |
Remarks
By default, this log level is below the default log level of Dalamud. Messages logged at this level will not be
recorded unless the global log level is specifically set to Verbose. Release plugins must also set the
Dalamud.Plugin.Services.IPluginLog.MinimumLogLevel to Serilog.Events.LogEventLevel.Verbose to use this level, and should only do so
upon specific user request (e.g. a "Enable Troubleshooting Logs" button).
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.
void Write(LogEventLevel level, Exception? exception, string messageTemplate, params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
Serilog.Events.LogEventLevel | level | The log level for this event. |
System.Exception | exception | An (optional) exception that should be recorded alongside this event. |
System.String | messageTemplate | Message template describing the event. |
System.Object[] | values | Objects positionally formatted into the message template. |