From 1d156527ea8fef0a96faa54d7ff61244e4be4094 Mon Sep 17 00:00:00 2001 From: Andreas Kohn Date: Fri, 1 Nov 2024 18:28:50 +0100 Subject: [PATCH] events: Use `WithLazy` to prevent eager serialization of the event data (#6671) --- modules/caddyevents/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/caddyevents/app.go b/modules/caddyevents/app.go index 2e4a6f2c..e78b00f8 100644 --- a/modules/caddyevents/app.go +++ b/modules/caddyevents/app.go @@ -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")