diff --git a/ChatTwo/Commands.cs b/ChatTwo/Commands.cs index f7fafc9..51cda31 100755 --- a/ChatTwo/Commands.cs +++ b/ChatTwo/Commands.cs @@ -1,5 +1,4 @@ using Dalamud.Game.Command; -using Dalamud.Logging; namespace ChatTwo; @@ -45,14 +44,14 @@ internal sealed class Commands : IDisposable { private void Invoke(string command, string arguments) { if (!this.Registered.TryGetValue(command, out var wrapper)) { - PluginLog.Warning($"Missing registration for command {command}"); + Plugin.Log.Warning($"Missing registration for command {command}"); return; } try { wrapper.Invoke(command, arguments); } catch (Exception ex) { - PluginLog.Error(ex, $"Error while executing command {command}"); + Plugin.Log.Error(ex, $"Error while executing command {command}"); } } } diff --git a/ChatTwo/Configuration.cs b/ChatTwo/Configuration.cs index 3228cb9..ac81fb8 100755 --- a/ChatTwo/Configuration.cs +++ b/ChatTwo/Configuration.cs @@ -2,7 +2,6 @@ using ChatTwo.Code; using ChatTwo.Resources; using ChatTwo.Ui; using Dalamud.Configuration; -using Dalamud.Logging; using ImGuiNET; namespace ChatTwo; @@ -124,7 +123,7 @@ internal class Configuration : IPluginConfiguration { break; default: - PluginLog.Warning($"Couldn't migrate config version {this.Version}"); + Plugin.Log.Warning($"Couldn't migrate config version {this.Version}"); loop = false; break; } diff --git a/ChatTwo/GameFunctions/Chat.cs b/ChatTwo/GameFunctions/Chat.cs index 59c4e81..3979b5c 100755 --- a/ChatTwo/GameFunctions/Chat.cs +++ b/ChatTwo/GameFunctions/Chat.cs @@ -6,7 +6,6 @@ using Dalamud.Game.ClientState.Keys; using Dalamud.Game.Config; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Hooking; -using Dalamud.Logging; using Dalamud.Memory; using Dalamud.Plugin.Services; using Dalamud.Utility.Signatures; @@ -432,7 +431,7 @@ internal sealed unsafe class Chat : IDisposable { TellReason = TellReason.Reply, }); } catch (Exception ex) { - PluginLog.LogError(ex, "Error in chat Activated event"); + Plugin.Log.Error(ex, "Error in chat Activated event"); } } } @@ -483,7 +482,7 @@ internal sealed unsafe class Chat : IDisposable { }; this.Activated?.Invoke(args); } catch (Exception ex) { - PluginLog.LogError(ex, "Error in chat Activated event"); + Plugin.Log.Error(ex, "Error in chat Activated event"); } // prevent the game from focusing the chat log @@ -566,7 +565,7 @@ internal sealed unsafe class Chat : IDisposable { TellTarget = target, }); } catch (Exception ex) { - PluginLog.LogError(ex, "Error in chat Activated event"); + Plugin.Log.Error(ex, "Error in chat Activated event"); } } diff --git a/ChatTwo/PayloadHandler.cs b/ChatTwo/PayloadHandler.cs index 611e3f6..6f4aa16 100755 --- a/ChatTwo/PayloadHandler.cs +++ b/ChatTwo/PayloadHandler.cs @@ -9,7 +9,6 @@ using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Interface.Internal; using Dalamud.Interface.Utility; -using Dalamud.Logging; using Dalamud.Utility; using ImGuiNET; using Lumina.Excel.GeneratedSheets; @@ -101,7 +100,7 @@ internal sealed class PayloadHandler { try { this.Ui.Plugin.Ipc.Invoke(id, sender, contentId, payload, chunk.Message?.SenderSource, chunk.Message?.ContentSource); } catch (Exception ex) { - PluginLog.Error(ex, "Error executing integration"); + Plugin.Log.Error(ex, "Error executing integration"); } } @@ -354,7 +353,7 @@ internal sealed class PayloadHandler { try { action(link.CommandId, new SeString(payloads)); } catch (Exception ex) { - PluginLog.LogError(ex, "Error executing DalamudLinkPayload handler"); + Plugin.Log.Error(ex, "Error executing DalamudLinkPayload handler"); } } diff --git a/ChatTwo/PluginUi.cs b/ChatTwo/PluginUi.cs index f6aa343..8d7e09e 100755 --- a/ChatTwo/PluginUi.cs +++ b/ChatTwo/PluginUi.cs @@ -3,7 +3,6 @@ using System.Runtime.InteropServices; using ChatTwo.Ui; using Dalamud.Interface; using Dalamud.Interface.GameFonts; -using Dalamud.Logging; using ImGuiNET; namespace ChatTwo; @@ -151,7 +150,7 @@ internal sealed class PluginUi : IDisposable { try { component.Draw(); } catch (Exception ex) { - PluginLog.LogError(ex, "Error drawing component"); + Plugin.Log.Error(ex, "Error drawing component"); } } diff --git a/ChatTwo/Store.cs b/ChatTwo/Store.cs index 6239015..ed69284 100755 --- a/ChatTwo/Store.cs +++ b/ChatTwo/Store.cs @@ -6,7 +6,6 @@ using ChatTwo.Resources; using ChatTwo.Util; using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; -using Dalamud.Logging; using Dalamud.Plugin.Services; using ImGuiNET; using LiteDB; @@ -250,7 +249,7 @@ internal class Store : IDisposable { var lastId = ObjectId.Empty; for (var i = 0; i < rounds; i++) { this._migrateCurrent = i + 1; - PluginLog.Log($"Update round {i + 1}/{rounds}"); + Plugin.Log.Info($"Update round {i + 1}/{rounds}"); var messages = this.Messages.Query() .OrderBy(msg => msg.Id) .Where(msg => msg.Id > lastId) diff --git a/ChatTwo/Ui/ChatLog.cs b/ChatTwo/Ui/ChatLog.cs index 83c2afa..96532b2 100755 --- a/ChatTwo/Ui/ChatLog.cs +++ b/ChatTwo/Ui/ChatLog.cs @@ -13,7 +13,6 @@ using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Interface; using Dalamud.Interface.Internal; using Dalamud.Interface.Utility; -using Dalamud.Logging; using Dalamud.Memory; using ImGuiNET; using Lumina.Excel.GeneratedSheets; @@ -328,7 +327,7 @@ internal sealed class ChatLog : IUiComponent { TellReason = reason, }); } catch (Exception ex) { - PluginLog.LogError(ex, "Error in chat Activated event"); + Plugin.Log.Error(ex, "Error in chat Activated event"); } } } diff --git a/ChatTwo/Ui/SettingsTabs/ChatColours.cs b/ChatTwo/Ui/SettingsTabs/ChatColours.cs index 7fe9bad..e2f9aae 100755 --- a/ChatTwo/Ui/SettingsTabs/ChatColours.cs +++ b/ChatTwo/Ui/SettingsTabs/ChatColours.cs @@ -23,10 +23,10 @@ internal sealed class ChatColours : ISettingsTab { .ToHashSet(); var total = Enum.GetValues().Where(type => !type.IsGm()).ToHashSet(); if (sortable.Count != total.Count) { - Dalamud.Logging.PluginLog.Warning($"There are {sortable.Count} sortable channels, but there are {total.Count} total channels."); + Dalamud.Logging.Plugin.Log.Warning($"There are {sortable.Count} sortable channels, but there are {total.Count} total channels."); total.ExceptWith(sortable); foreach (var missing in total) { - Dalamud.Logging.PluginLog.Log($"Missing {missing}"); + Dalamud.Logging.Plugin.Log.Log($"Missing {missing}"); } } #endif