mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-13 02:34:23 +01:00
20 lines
336 B
Go
20 lines
336 B
Go
package trace
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/zrepl/zrepl/internal/util/envconst"
|
|
)
|
|
|
|
const debugEnabledEnvVar = "ZREPL_TRACE_DEBUG_ENABLED"
|
|
|
|
var debugEnabled = envconst.Bool(debugEnabledEnvVar, false)
|
|
|
|
func debug(format string, args ...interface{}) {
|
|
if !debugEnabled {
|
|
return
|
|
}
|
|
fmt.Fprintf(os.Stderr, format+"\n", args...)
|
|
}
|