Unify Content's EntitySystem logging (#26216)

Use Log with generated sawmill name rather than explicitly named one for all non rule-based Content EntitySystems.
This commit is contained in:
LordCarve
2024-03-17 21:30:27 +01:00
committed by GitHub
parent 4357b9ef08
commit eeaea6c25b
13 changed files with 43 additions and 82 deletions

View File

@@ -64,8 +64,6 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
[Dependency] private readonly TransformSystem _transformSystem = default!;
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
private ISawmill _sawmill = default!;
private const float ShuttleSpawnBuffer = 1f;
private bool _emergencyShuttleEnabled;
@@ -75,7 +73,6 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
public override void Initialize()
{
_sawmill = Logger.GetSawmill("shuttle.emergency");
_emergencyShuttleEnabled = _configManager.GetCVar(CCVars.EmergencyShuttleEnabled);
// Don't immediately invoke as roundstart will just handle it.
Subs.CVar(_configManager, CCVars.EmergencyShuttleEnabled, SetEmergencyShuttleEnabled);
@@ -391,7 +388,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
{
if (component.MapEntity != null || component.Entity != null)
{
_sawmill.Warning("Attempted to re-add an existing centcomm map.");
Log.Warning("Attempted to re-add an existing centcomm map.");
return;
}
@@ -416,7 +413,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
if (string.IsNullOrEmpty(component.Map.ToString()))
{
_sawmill.Warning("No CentComm map found, skipping setup.");
Log.Warning("No CentComm map found, skipping setup.");
return;
}
@@ -491,7 +488,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
if (shuttle == null)
{
_sawmill.Error($"Unable to spawn emergency shuttle {shuttlePath} for {ToPrettyString(uid)}");
Log.Error($"Unable to spawn emergency shuttle {shuttlePath} for {ToPrettyString(uid)}");
return;
}