Only attach logger in debug mode. Fixes #1128

This commit is contained in:
Lea Anthony
2022-02-07 20:00:26 +11:00
parent a016f39e97
commit 24857ec04b
+1 -1
View File
@@ -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")