From 02659c68b6efb66825f808720c98a7da45dff5da Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 18 Oct 2014 12:03:47 +0200 Subject: [PATCH] fix IPFS_DEBUG (was set after SetupLogging) --- cmd/ipfs/ipfs.go | 2 -- util/log.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/ipfs/ipfs.go b/cmd/ipfs/ipfs.go index bc5922dd8..fb5b26597 100644 --- a/cmd/ipfs/ipfs.go +++ b/cmd/ipfs/ipfs.go @@ -86,8 +86,6 @@ func ipfsCmd(c *commander.Command, args []string) error { } func main() { - u.Debug = u.GetenvBool("IPFS_DEBUG") - // if debugging, setup profiling. if u.Debug { ofi, err := os.Create("cpu.prof") diff --git a/util/log.go b/util/log.go index b10c9e705..6a66024de 100644 --- a/util/log.go +++ b/util/log.go @@ -41,6 +41,7 @@ func SetupLogging() { } } + Debug = GetenvBool("IPFS_DEBUG") if Debug { lvl = logging.DEBUG }