[PRIORITY NEGATIVE ONE/STABLE HOTFIX] ADMIN NOTES CANNOT BE ACCESSED (#40863)
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Fix logger obsolete warnings (#40553)"
This commit is contained in:
committed by
GitHub
parent
9877b77fff
commit
e917c8e067
@@ -14,18 +14,12 @@ namespace Content.Client.UserInterface.Systems.Alerts.Widgets;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class AlertsUI : UIWidget
|
||||
{
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
|
||||
private readonly ISawmill _sawmill = default!;
|
||||
|
||||
// also known as Control.Children?
|
||||
private readonly Dictionary<AlertKey, AlertControl> _alertControls = new();
|
||||
|
||||
public AlertsUI()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
_sawmill = _logManager.GetSawmill("alertsui");
|
||||
}
|
||||
|
||||
public void SyncControls(AlertsSystem alertsSystem,
|
||||
@@ -84,15 +78,15 @@ public sealed partial class AlertsUI : UIWidget
|
||||
{
|
||||
if (!alertKey.AlertType.HasValue)
|
||||
{
|
||||
_sawmill.Warning("found alertkey without alerttype," +
|
||||
" alert keys should never be stored without an alerttype set: {0}", alertKey);
|
||||
Logger.WarningS("alert", "found alertkey without alerttype," +
|
||||
" alert keys should never be stored without an alerttype set: {0}", alertKey);
|
||||
continue;
|
||||
}
|
||||
|
||||
var alertType = alertKey.AlertType.Value;
|
||||
if (!alertsSystem.TryGet(alertType, out var newAlert))
|
||||
{
|
||||
_sawmill.Error("Unrecognized alertType {0}", alertType);
|
||||
Logger.ErrorS("alert", "Unrecognized alertType {0}", alertType);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user