From: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:09:24 +0000 (-0500) Subject: add more info to entity json in logs (#18672) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=763a25e9345bd1f02aada9a47d7829b239a74e52;p=space-station-14.git add more info to entity json in logs (#18672) * add more info to entity json in logs * replace TryGetSessionById * remove unused dependency * get admin status from the entity * group values by component * alphabetize * I've discovered that my original plans may be bad for performance --- diff --git a/Content.Server/Administration/Logs/Converters/EntityStringRepresentationConverter.cs b/Content.Server/Administration/Logs/Converters/EntityStringRepresentationConverter.cs index 32551e5a7d..39d34e5f18 100644 --- a/Content.Server/Administration/Logs/Converters/EntityStringRepresentationConverter.cs +++ b/Content.Server/Administration/Logs/Converters/EntityStringRepresentationConverter.cs @@ -1,10 +1,14 @@ using System.Text.Json; +using Content.Server.Administration.Managers; +using Robust.Server.Player; namespace Content.Server.Administration.Logs.Converters; [AdminLogConverter] public sealed class EntityStringRepresentationConverter : AdminLogConverter { + [Dependency] private readonly IAdminManager _adminManager = default!; + public override void Write(Utf8JsonWriter writer, EntityStringRepresentation value, JsonSerializerOptions options) { writer.WriteStartObject(); @@ -19,6 +23,21 @@ public sealed class EntityStringRepresentationConverter : AdminLogConverter