]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Update AccessLevelControl.xaml.cs to use ISawmill (#29987)
authorWinkarst <74284083+Winkarst-cpu@users.noreply.github.com>
Sun, 14 Jul 2024 10:24:26 +0000 (13:24 +0300)
committerGitHub <noreply@github.com>
Sun, 14 Jul 2024 10:24:26 +0000 (20:24 +1000)
* Update AccessLevelControl.xaml.cs to use ISawmill

* Update

* Silly me

* Update

Content.Client/Access/UI/AccessLevelControl.xaml.cs

index 34db80b7af9ad8ab316b955b2e85f38413e6ec08..9f09eceec061350b4049c6a55528aaa28467acaf 100644 (file)
@@ -12,11 +12,17 @@ namespace Content.Client.Access.UI;
 [GenerateTypedNameReferences]
 public sealed partial class AccessLevelControl : GridContainer
 {
+    [Dependency] private readonly ILogManager _logManager = default!;
+
+    private ISawmill _sawmill = default!;
+
     public readonly Dictionary<ProtoId<AccessLevelPrototype>, Button> ButtonsList = new();
 
     public AccessLevelControl()
     {
         RobustXamlLoader.Load(this);
+
+        _sawmill = _logManager.GetSawmill("accesslevelcontrol");
     }
 
     public void Populate(List<ProtoId<AccessLevelPrototype>> accessLevels, IPrototypeManager prototypeManager)
@@ -25,7 +31,7 @@ public sealed partial class AccessLevelControl : GridContainer
         {
             if (!prototypeManager.TryIndex(access, out var accessLevel))
             {
-                Logger.Error($"Unable to find accesslevel for {access}");
+                _sawmill.Error($"Unable to find accesslevel for {access}");
                 continue;
             }