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 }