Cleanup some easy-to-fix static logger warnings (#37820)
This commit is contained in:
@@ -17,8 +17,11 @@ public sealed class RoleBanCommand : IConsoleCommand
|
||||
[Dependency] private readonly IPlayerLocator _locator = default!;
|
||||
[Dependency] private readonly IBanManager _bans = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly ILogManager _log = default!;
|
||||
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||
|
||||
private ISawmill? _sawmill;
|
||||
|
||||
public string Command => "roleban";
|
||||
public string Description => Loc.GetString("cmd-roleban-desc");
|
||||
public string Help => Loc.GetString("cmd-roleban-help");
|
||||
@@ -31,7 +34,8 @@ public sealed class RoleBanCommand : IConsoleCommand
|
||||
uint minutes;
|
||||
if (!Enum.TryParse(_cfg.GetCVar(CCVars.RoleBanDefaultSeverity), out NoteSeverity severity))
|
||||
{
|
||||
Logger.WarningS("admin.role_ban", "Role ban severity could not be parsed from config! Defaulting to medium.");
|
||||
_sawmill ??= _log.GetSawmill("admin.role_ban");
|
||||
_sawmill.Warning("Role ban severity could not be parsed from config! Defaulting to medium.");
|
||||
severity = NoteSeverity.Medium;
|
||||
}
|
||||
|
||||
@@ -81,7 +85,7 @@ public sealed class RoleBanCommand : IConsoleCommand
|
||||
|
||||
if (!_proto.HasIndex<JobPrototype>(job))
|
||||
{
|
||||
shell.WriteError(Loc.GetString("cmd-roleban-job-parse",("job", job)));
|
||||
shell.WriteError(Loc.GetString("cmd-roleban-job-parse", ("job", job)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user