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,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);
|
||||
|
||||
Reference in New Issue
Block a user