Obsolete Logger cleanup for EntitySystems (#25941)

* Small obsolete Logger cleanup

* Fixed three EntitySystem logs that weren't doing it right.
This commit is contained in:
LordCarve
2024-03-10 01:15:13 +01:00
committed by GitHub
parent 865765d4ec
commit aafe815122
25 changed files with 41 additions and 45 deletions

View File

@@ -171,7 +171,7 @@ namespace Content.Shared.Interaction
{
if (!ValidateClientInput(session, coords, uid, out var userEntity))
{
Logger.InfoS("system.interaction", $"TryPullObject input validation failed");
Log.Info($"TryPullObject input validation failed");
return true;
}
@@ -203,7 +203,7 @@ namespace Content.Shared.Interaction
// client sanitization
if (!TryComp(item, out TransformComponent? itemXform) || !ValidateClientInput(args.SenderSession, itemXform.Coordinates, item, out var user))
{
Logger.InfoS("system.interaction", $"Inventory interaction validation failed. Session={args.SenderSession}");
Log.Info($"Inventory interaction validation failed. Session={args.SenderSession}");
return;
}
@@ -225,7 +225,7 @@ namespace Content.Shared.Interaction
// client sanitization
if (!ValidateClientInput(session, coords, uid, out var user))
{
Logger.InfoS("system.interaction", $"Alt-use input validation failed");
Log.Info($"Alt-use input validation failed");
return true;
}
@@ -239,7 +239,7 @@ namespace Content.Shared.Interaction
// client sanitization
if (!ValidateClientInput(session, coords, uid, out var userEntity))
{
Logger.InfoS("system.interaction", $"Use input validation failed");
Log.Info($"Use input validation failed");
return true;
}
@@ -547,7 +547,7 @@ namespace Content.Shared.Interaction
if (length > MaxRaycastRange)
{
Logger.Warning("InRangeUnobstructed check performed over extreme range. Limiting CollisionRay size.");
Log.Warning("InRangeUnobstructed check performed over extreme range. Limiting CollisionRay size.");
length = MaxRaycastRange;
}
@@ -921,7 +921,7 @@ namespace Content.Shared.Interaction
{
if (!ValidateClientInput(session, coords, uid, out var user))
{
Logger.InfoS("system.interaction", $"ActivateItemInWorld input validation failed");
Log.Info($"ActivateItemInWorld input validation failed");
return false;
}
@@ -1100,14 +1100,13 @@ namespace Content.Shared.Interaction
if (!coords.IsValid(EntityManager))
{
Logger.InfoS("system.interaction", $"Invalid Coordinates: client={session}, coords={coords}");
Log.Info($"Invalid Coordinates: client={session}, coords={coords}");
return false;
}
if (IsClientSide(uid))
{
Logger.WarningS("system.interaction",
$"Client sent interaction with client-side entity. Session={session}, Uid={uid}");
Log.Warning($"Client sent interaction with client-side entity. Session={session}, Uid={uid}");
return false;
}
@@ -1115,15 +1114,13 @@ namespace Content.Shared.Interaction
if (userEntity == null || !userEntity.Value.Valid)
{
Logger.WarningS("system.interaction",
$"Client sent interaction with no attached entity. Session={session}");
Log.Warning($"Client sent interaction with no attached entity. Session={session}");
return false;
}
if (!Exists(userEntity))
{
Logger.WarningS("system.interaction",
$"Client attempted interaction with a non-existent attached entity. Session={session}, entity={userEntity}");
Log.Warning($"Client attempted interaction with a non-existent attached entity. Session={session}, entity={userEntity}");
return false;
}