From 24857ec04bba248098af293c7221ef7cd36ea58b Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 7 Feb 2022 20:00:26 +1100 Subject: [PATCH] Only attach logger in debug mode. Fixes #1128 --- v2/internal/appng/app_production.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/internal/appng/app_production.go b/v2/internal/appng/app_production.go index 8cd4f59f..07afaf9f 100644 --- a/v2/internal/appng/app_production.go +++ b/v2/internal/appng/app_production.go @@ -81,8 +81,8 @@ func CreateApp(appoptions *options.App) (*App, error) { debug := IsDebug() ctx = context.WithValue(ctx, "debug", debug) // Attach logger to context - ctx = context.WithValue(ctx, "logger", myLogger) if debug { + ctx = context.WithValue(ctx, "logger", myLogger) ctx = context.WithValue(ctx, "buildtype", "debug") } else { ctx = context.WithValue(ctx, "buildtype", "production")