(Cleanup) Fix logger obsolete warnings (#40553)

* Switched obsolete logger usages to use Sawmill

Fix the majority of obsolete logger usages outside the engine code.

* Fix injection in ChatManager and revert BuildMech changes

* Removed extra manual injection

* Reduced extra static injection and reverted changes to CommandButton as it needs engine changes.

* Removed two more cases of double injection and an extra using

* Reverted changes for Inventory Display

* Moved sawmill setup outside constructor in Table to resolve test failure
This commit is contained in:
David
2025-10-07 05:45:01 -06:00
committed by GitHub
parent 101b9ffb25
commit 691ca31b95
10 changed files with 63 additions and 22 deletions

View File

@@ -14,6 +14,9 @@ namespace Content.Client.Administration.UI.Notes;
[GenerateTypedNameReferences]
public sealed partial class AdminNotesLine : BoxContainer
{
[Dependency] private readonly ILogManager _logManager = default!;
private readonly ISawmill _sawmill = default!;
private readonly SpriteSystem _sprites;
private const string AdminNotesTextureBase = "/Textures/Interface/AdminNotes/";
@@ -33,6 +36,8 @@ public sealed partial class AdminNotesLine : BoxContainer
public AdminNotesLine(SpriteSystem sprites, SharedAdminNote note)
{
RobustXamlLoader.Load(this);
_sawmill = _logManager.GetSawmill("admin.notes");
_sprites = sprites;
Note = note;
@@ -61,7 +66,7 @@ public sealed partial class AdminNotesLine : BoxContainer
if (iconPath is null)
{
SeverityRect.Visible = false;
Logger.WarningS("admin.notes", $"Could not find an icon for note ID {Note.Id}");
_sawmill.Warning($"Could not find an icon for note ID {Note.Id}");
}
else
{