Add Elastic-bound logging of (almost) all database update events
This commit is contained in:
@@ -81,7 +81,7 @@ namespace PluralKit.Bot
|
||||
|
||||
_logger
|
||||
.ForContext("RequestUrlRoute", endpoint)
|
||||
.Information(
|
||||
.Debug(
|
||||
"HTTP: {RequestMethod} {RequestUrl} -> {ResponseStatusCode} {ResponseStatusString} (in {RequestDurationMs:F1} ms)",
|
||||
response.RequestMessage.Method,
|
||||
response.RequestMessage.RequestUri,
|
||||
|
@@ -22,7 +22,6 @@ namespace PluralKit.Bot
|
||||
var props = new List<LogEventProperty>
|
||||
{
|
||||
new LogEventProperty("Type", new ScalarValue(dea.EventType())),
|
||||
new LogEventProperty("Shard", new ScalarValue(dea.Client.ShardId))
|
||||
};
|
||||
|
||||
void AddMessage(DiscordMessage msg)
|
||||
@@ -47,6 +46,9 @@ namespace PluralKit.Bot
|
||||
props.Add(new LogEventProperty("ReactingUserId", new ScalarValue(mra.User.Id)));
|
||||
props.Add(new LogEventProperty("Emoji", new ScalarValue(mra.Emoji.GetDiscordName())));
|
||||
}
|
||||
|
||||
// Want shard last, just for visual reasons
|
||||
props.Add(new LogEventProperty("Shard", new ScalarValue(dea.Client.ShardId)));
|
||||
|
||||
result = new StructureValue(props);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user