events: Use `WithLazy` to prevent eager serialization of the event data (#6671)

This commit is contained in:
Andreas Kohn 2024-11-01 18:28:50 +01:00 committed by GitHub
parent 350ad38f63
commit 1d156527ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ func (app *App) Emit(ctx caddy.Context, eventName string, data map[string]any) E
return nil, false
})
logger = logger.With(zap.Any("data", e.Data))
logger = logger.WithLazy(zap.Any("data", e.Data))
logger.Debug("event")