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

@@ -31,12 +31,10 @@ namespace Content.Server.Chemistry.EntitySystems
private const float ReactTime = 0.125f;
private ISawmill _sawmill = default!;
public override void Initialize()
{
base.Initialize();
_sawmill = Logger.GetSawmill("vapor");
SubscribeLocalEvent<VaporComponent, StartCollideEvent>(HandleCollide);
}
@@ -128,7 +126,7 @@ namespace Content.Server.Chemistry.EntitySystems
if (reaction > reagentQuantity.Quantity)
{
_sawmill.Error($"Tried to tile react more than we have for reagent {reagentQuantity}. Found {reaction} and we only have {reagentQuantity.Quantity}");
Log.Error($"Tried to tile react more than we have for reagent {reagentQuantity}. Found {reaction} and we only have {reagentQuantity.Quantity}");
reaction = reagentQuantity.Quantity;
}