Cleanup some easy-to-fix static logger warnings (#37820)

This commit is contained in:
Tayrtahn
2025-05-25 17:20:08 -04:00
committed by GitHub
parent 1f2d4e7efc
commit 3c48e6abaa
5 changed files with 23 additions and 8 deletions

View File

@@ -9,9 +9,12 @@ namespace Content.Server.EUI
{
public sealed class EuiManager : IPostInjectInit
{
[Dependency] private readonly ILogManager _log = default!;
[Dependency] private readonly IPlayerManager _players = default!;
[Dependency] private readonly IServerNetManager _net = default!;
private ISawmill? _sawmill;
private readonly Dictionary<ICommonSession, PlayerEuiData> _playerData =
new();
@@ -34,6 +37,7 @@ namespace Content.Server.EUI
_net.RegisterNetMessage<MsgEuiCtl>();
_net.RegisterNetMessage<MsgEuiState>();
_net.RegisterNetMessage<MsgEuiMessage>(RxMsgMessage);
_sawmill = _log.GetSawmill("eui");
}
public void SendUpdates()
@@ -99,7 +103,7 @@ namespace Content.Server.EUI
if (!dat.OpenUIs.TryGetValue(message.Id, out var eui))
{
Logger.WarningS("eui", $"Got EUI message from player {ply} for non-existing UI {message.Id}");
_sawmill?.Warning($"Got EUI message from player {ply} for non-existing UI {message.Id}");
return;
}