summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/log/log.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/log/log.go b/internal/log/log.go
index d25ea8e..0238c7e 100644
--- a/internal/log/log.go
+++ b/internal/log/log.go
@@ -6,6 +6,7 @@ import (
"os"
)
+var debugLogger = log.New(os.Stdout, "", log.LstdFlags)
var errorLogger = log.New(os.Stderr, "ERROR ", log.LstdFlags|log.Lmsgprefix)
var warnLogger = log.New(os.Stdout, "WARN ", log.LstdFlags|log.Lmsgprefix)
var enableDebug = false
@@ -16,13 +17,13 @@ func SetDebug(state bool) {
func Print(v ...interface{}) {
if enableDebug {
- _ = log.Output(2, fmt.Sprint(v...))
+ _ = debugLogger.Output(2, fmt.Sprint(v...))
}
}
func Printf(format string, v ...interface{}) {
if enableDebug {
- _ = log.Output(2, fmt.Sprintf(format, v...))
+ _ = debugLogger.Output(2, fmt.Sprintf(format, v...))
}
}