diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs index 8e1eaea4b..d6d603346 100644 --- a/Dalamud/Plugin/DalamudPluginInterface.cs +++ b/Dalamud/Plugin/DalamudPluginInterface.cs @@ -109,5 +109,39 @@ namespace Dalamud.Plugin return this.dalamud.Configuration.PluginConfigurations[this.pluginName] as IPluginConfiguration; } + + #region Logging + + /// + /// Log a templated message to the in-game debug log. + /// + /// The message template. + /// Values to log. + public void Log(string messageTemplate, params object[] values) { + Serilog.Log.Information(messageTemplate, values); + } + + /// + /// Log a templated error message to the in-game debug log. + /// + /// The message template. + /// Values to log. + public void LogError(string messageTemplate, params object[] values) + { + Serilog.Log.Error(messageTemplate, values); + } + + /// + /// Log a templated error message to the in-game debug log. + /// + /// The exception that caused the error. + /// The message template. + /// Values to log. + public void LogError(Exception exception, string messageTemplate, params object[] values) + { + Serilog.Log.Error(exception, messageTemplate, values); + } + + #endregion } }