From 763a25e9345bd1f02aada9a47d7829b239a74e52 Mon Sep 17 00:00:00 2001 From: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com> Date: Tue, 2 Jul 2024 04:09:24 -0500 Subject: [PATCH] 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 --- .../EntityStringRepresentationConverter.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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