Add more debug logging to admin logs
This commit is contained in:
@@ -38,6 +38,10 @@ namespace Content.Server.Database
|
||||
{
|
||||
x.Ignore(CoreEventId.ManyServiceProvidersCreatedWarning);
|
||||
});
|
||||
|
||||
#if DEBUG
|
||||
options.EnableSensitiveDataLogging();
|
||||
#endif
|
||||
}
|
||||
|
||||
public PostgresServerDbContext(DbContextOptions<ServerDbContext> options) : base(options)
|
||||
|
||||
@@ -14,6 +14,7 @@ using Robust.Shared.Configuration;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Timing;
|
||||
using static Content.Shared.Administration.AdminLogsEuiMsg;
|
||||
|
||||
namespace Content.Server.Administration.Logs;
|
||||
@@ -142,6 +143,9 @@ public sealed class AdminLogsEui : BaseEui
|
||||
|
||||
private async void SendLogs(bool replace)
|
||||
{
|
||||
var stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
|
||||
// TODO ADMIN LOGS array pool
|
||||
var logs = new List<SharedAdminLog>(_clientBatchSize);
|
||||
|
||||
@@ -171,6 +175,8 @@ public sealed class AdminLogsEui : BaseEui
|
||||
var message = new NewLogs(logs.ToArray(), replace);
|
||||
|
||||
SendMessage(message);
|
||||
|
||||
_sawmill.Info($"Sent {logs.Count} logs to {Player.Name} in {stopwatch.Elapsed.TotalMilliseconds} ms");
|
||||
}
|
||||
|
||||
public override void Closed()
|
||||
|
||||
Reference in New Issue
Block a user