Add more pretty strings to logs (#5768)

This commit is contained in:
Leon Friedrich
2021-12-14 00:22:58 +13:00
committed by GitHub
parent fa1de1a75a
commit 7f81f0b8b8
41 changed files with 98 additions and 91 deletions

View File

@@ -468,7 +468,7 @@ namespace Content.Shared.Interaction
RaiseLocalEvent(used, activateMsg);
if (activateMsg.Handled)
{
_adminLogSystem.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user)} activated {ToPrettyString(used)}");
_adminLogSystem.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user):user} activated {ToPrettyString(used):used}");
return;
}
@@ -477,7 +477,7 @@ namespace Content.Shared.Interaction
var activateEventArgs = new ActivateEventArgs(user, used);
activateComp.Activate(activateEventArgs);
_adminLogSystem.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user)} activated {ToPrettyString(used)}"); // No way to check success.
_adminLogSystem.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user):user} activated {ToPrettyString(used):used}"); // No way to check success.
}
#endregion
@@ -556,7 +556,7 @@ namespace Content.Shared.Interaction
RaiseLocalEvent(thrown, throwMsg);
if (throwMsg.Handled)
{
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user)} threw {ToPrettyString(thrown)}");
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user):user} threw {ToPrettyString(thrown):entity}");
return;
}
@@ -568,7 +568,7 @@ namespace Content.Shared.Interaction
{
comp.Thrown(args);
}
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user)} threw {ToPrettyString(thrown)}");
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user):user} threw {ToPrettyString(thrown):entity}");
}
#endregion
@@ -677,7 +677,7 @@ namespace Content.Shared.Interaction
RaiseLocalEvent(item, dropMsg);
if (dropMsg.Handled)
{
_adminLogSystem.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user)} dropped {ToPrettyString(item)}");
_adminLogSystem.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user):user} dropped {ToPrettyString(item):entity}");
return;
}
@@ -690,7 +690,7 @@ namespace Content.Shared.Interaction
{
comp.Dropped(new DroppedEventArgs(user));
}
_adminLogSystem.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user)} dropped {ToPrettyString(item)}");
_adminLogSystem.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user):user} dropped {ToPrettyString(item):entity}");
}
#endregion