1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

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

View file

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