diff --git a/daemon/logging/trace/trace.go b/daemon/logging/trace/trace.go index 8421800..08caea2 100644 --- a/daemon/logging/trace/trace.go +++ b/daemon/logging/trace/trace.go @@ -246,7 +246,7 @@ func WithTask(ctx context.Context, taskName string) (context.Context, DoneFunc) // the debugString can be quite long and panic won't print it completely fmt.Fprintf(os.Stderr, "going to panic due to activeChildTasks:\n%s\n", this.debugString()) } - panic(errors.WithMessagef(ErrTaskStillHasActiveChildTasks, "end task: %v active child tasks\n", this.activeChildTasks)) + panic(errors.WithMessagef(ErrTaskStillHasActiveChildTasks, "end task: %v active child tasks (run daemon with env var %s=1 for more details)\n", this.activeChildTasks, debugEnabledEnvVar)) } // support idempotent task ends diff --git a/daemon/logging/trace/trace_debug.go b/daemon/logging/trace/trace_debug.go index 93ca6e7..c12f80f 100644 --- a/daemon/logging/trace/trace_debug.go +++ b/daemon/logging/trace/trace_debug.go @@ -7,7 +7,9 @@ import ( "github.com/zrepl/zrepl/util/envconst" ) -var debugEnabled = envconst.Bool("ZREPL_TRACE_DEBUG_ENABLED", false) +const debugEnabledEnvVar = "ZREPL_TRACE_DEBUG_ENABLED" + +var debugEnabled = envconst.Bool(debugEnabledEnvVar, false) func debug(format string, args ...interface{}) { if !debugEnabled {