fix IPFS_DEBUG logging
Henry committed
Oct 14, 2014 at 10:21 UTC
515505dccb5f2ddee948b9192091124376a6bb39
2 files changed
+3
-1
util/log.go
+2
@@ -44,6 +44,8 @@ func SetupLogging() {
44
}
45
46
if GetenvBool("IPFS_DEBUG") {
47
+ log.Debug("enabling debug printing")
48
+ Debug = true
49
SetAllLoggers(logging.DEBUG)
50
}
51
util/util.go
+1
-1
@@ -127,5 +127,5 @@ func (r *randGen) Read(p []byte) (n int, err error) {
127
// GetenvBool is the way to check an env var as a boolean
128
func GetenvBool(name string) bool {
129
v := strings.ToLower(os.Getenv(name))
130
- return v == "true" || v != "t" || v == "1"
130
+ return v == "true" || v == "t" || v == "1"
131
}