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

@@ -18,12 +18,10 @@ public sealed class LagCompensationSystem : EntitySystem
// Max ping I've had is 350ms from aus to spain.
public static readonly TimeSpan BufferTime = TimeSpan.FromMilliseconds(750);
private ISawmill _sawmill = Logger.GetSawmill("lagcomp");
public override void Initialize()
{
base.Initialize();
_sawmill.Level = LogLevel.Info;
Log.Level = LogLevel.Info;
SubscribeLocalEvent<LagCompensationComponent, MoveEvent>(OnLagMove);
}
@@ -87,13 +85,13 @@ public sealed class LagCompensationSystem : EntitySystem
if (coordinates == default)
{
_sawmill.Debug($"No long comp coords found, using {xform.Coordinates}");
Log.Debug($"No long comp coords found, using {xform.Coordinates}");
coordinates = xform.Coordinates;
angle = xform.LocalRotation;
}
else
{
_sawmill.Debug($"Actual coords is {xform.Coordinates} and got {coordinates}");
Log.Debug($"Actual coords is {xform.Coordinates} and got {coordinates}");
}
return (coordinates, angle);