diff --git a/util/log.go b/util/log.go index f180936bc..40e839be4 100644 --- a/util/log.go +++ b/util/log.go @@ -44,6 +44,8 @@ func SetupLogging() { } if GetenvBool("IPFS_DEBUG") { + log.Debug("enabling debug printing") + Debug = true SetAllLoggers(logging.DEBUG) } diff --git a/util/util.go b/util/util.go index 0cad70506..2947d8eca 100644 --- a/util/util.go +++ b/util/util.go @@ -127,5 +127,5 @@ func (r *randGen) Read(p []byte) (n int, err error) { // GetenvBool is the way to check an env var as a boolean func GetenvBool(name string) bool { v := strings.ToLower(os.Getenv(name)) - return v == "true" || v != "t" || v == "1" + return v == "true" || v == "t" || v == "1" }