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