Cleanup some easy-to-fix static logger warnings (#37820)
This commit is contained in:
@@ -16,6 +16,9 @@ public sealed class DepartmentBanCommand : IConsoleCommand
|
||||
[Dependency] private readonly IPlayerLocator _locator = default!;
|
||||
[Dependency] private readonly IBanManager _banManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly ILogManager _log = default!;
|
||||
|
||||
private ISawmill? _sawmill;
|
||||
|
||||
public string Command => "departmentban";
|
||||
public string Description => Loc.GetString("cmd-departmentban-desc");
|
||||
@@ -29,7 +32,8 @@ public sealed class DepartmentBanCommand : IConsoleCommand
|
||||
uint minutes;
|
||||
if (!Enum.TryParse(_cfg.GetCVar(CCVars.DepartmentBanDefaultSeverity), out NoteSeverity severity))
|
||||
{
|
||||
Logger.WarningS("admin.department_ban", "Department ban severity could not be parsed from config! Defaulting to medium.");
|
||||
_sawmill ??= _log.GetSawmill("admin.department_ban");
|
||||
_sawmill.Warning("Department ban severity could not be parsed from config! Defaulting to medium.");
|
||||
severity = NoteSeverity.Medium;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user