From 515505dccb5f2ddee948b9192091124376a6bb39 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 14 Oct 2014 10:21:03 +0200 Subject: [PATCH] fix IPFS_DEBUG logging --- util/log.go | 2 ++ util/util.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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" }