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:
@@ -18,14 +18,10 @@ public sealed class ThirstSystem : EntitySystem
|
||||
[Dependency] private readonly MovementSpeedModifierSystem _movement = default!;
|
||||
[Dependency] private readonly SharedJetpackSystem _jetpack = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_sawmill = Logger.GetSawmill("thirst");
|
||||
|
||||
SubscribeLocalEvent<ThirstComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovespeed);
|
||||
SubscribeLocalEvent<ThirstComponent, MapInitEvent>(OnMapInit);
|
||||
SubscribeLocalEvent<ThirstComponent, RejuvenateEvent>(OnRejuvenate);
|
||||
@@ -156,7 +152,7 @@ public sealed class ThirstSystem : EntitySystem
|
||||
return;
|
||||
|
||||
default:
|
||||
_sawmill.Error($"No thirst threshold found for {component.CurrentThirstThreshold}");
|
||||
Log.Error($"No thirst threshold found for {component.CurrentThirstThreshold}");
|
||||
throw new ArgumentOutOfRangeException($"No thirst threshold found for {component.CurrentThirstThreshold}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user