mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
many: unify boolean env var handling
This commit is contained in:
+3
-1
@@ -27,6 +27,8 @@ import (
|
||||
"log/syslog"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/snapcore/snapd/osutil"
|
||||
)
|
||||
|
||||
// A Logger is a fairly minimal logging tool.
|
||||
@@ -109,7 +111,7 @@ func (l *ConsoleLog) Debug(msg string) {
|
||||
s := "DEBUG: " + msg
|
||||
l.sys.Output(3, s)
|
||||
|
||||
if os.Getenv("SNAPD_DEBUG") != "" {
|
||||
if osutil.EnvBool("SNAPD_DEBUG") {
|
||||
l.log.Output(3, s)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user