mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Add persistent event ID to log context
This commit is contained in:
parent
ca4ffdb803
commit
e556cc71fa
1 changed files with 2 additions and 1 deletions
|
|
@ -102,12 +102,13 @@ namespace PluralKit.Bot
|
|||
|
||||
async Task HandleEventInner()
|
||||
{
|
||||
using var _ = LogContext.PushProperty("EventId", Guid.NewGuid());
|
||||
|
||||
// Mainly for testing ELK volume atm, no-op unless Elastic is configured
|
||||
if (evt is MessageCreateEventArgs mc)
|
||||
using (LogContext.PushProperty("Elastic", "yes?"))
|
||||
_logger.Information("Received event {@Event}", new
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
Type = mc.GetType().Name.Replace("EventArgs", ""),
|
||||
MessageId = mc.Message.Id,
|
||||
ChannelId = mc.Channel.Id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue