[#347] package trace: envconst-configurable debug mode

This commit is contained in:
Christian Schwarz 2020-08-29 19:16:10 +02:00
parent a7915db4c3
commit fecc9416ab

View File

@ -3,9 +3,11 @@ package trace
import ( import (
"fmt" "fmt"
"os" "os"
"github.com/zrepl/zrepl/util/envconst"
) )
const debugEnabled = false var debugEnabled = envconst.Bool("ZREPL_TRACE_DEBUG_ENABLED", false)
func debug(format string, args ...interface{}) { func debug(format string, args ...interface{}) {
if !debugEnabled { if !debugEnabled {