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

@@ -325,7 +325,7 @@ namespace Content.Server.Nutrition.EntitySystems
});
// logging
_logSystem.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(user)} is forcing {ToPrettyString(target)} to eat {ToPrettyString(uid)}");
_logSystem.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(user):user} is forcing {ToPrettyString(target):target} to eat {ToPrettyString(uid):food} {SolutionContainerSystem.ToPrettyString(foodSolution):solution}");
return true;
}
@@ -415,9 +415,9 @@ namespace Content.Server.Nutrition.EntitySystems
// logging
if (user == null)
_logSystem.Add(LogType.ForceFeed, $"{uid} was thrown into the mouth of {target}");
_logSystem.Add(LogType.ForceFeed, $"{ToPrettyString(uid):food} {SolutionContainerSystem.ToPrettyString(foodSolution):solution} was thrown into the mouth of {ToPrettyString(target):target}");
else
_logSystem.Add(LogType.ForceFeed, $"{user} threw {uid} into the mouth of {target}");
_logSystem.Add(LogType.ForceFeed, $"{ToPrettyString(user.Value):user} threw {ToPrettyString(uid):food} {SolutionContainerSystem.ToPrettyString(foodSolution):solution} into the mouth of {ToPrettyString(target):target}");
var filter = user == null ? Filter.Entities(target) : Filter.Entities(target, user.Value);
_popupSystem.PopupEntity(Loc.GetString(food.EatMessage), target, filter);