From 7ead660738a855052660564967eba841917f86d9 Mon Sep 17 00:00:00 2001 From: Matt Bell <mappum@gmail.com> Date: Thu, 6 Nov 2014 17:10:19 -0800 Subject: [PATCH] cmd/ipfs2: Set all loggers to DEBUG level when running with 'debug' flag --- cmd/ipfs2/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/ipfs2/main.go b/cmd/ipfs2/main.go index 5adc4181a..f56094685 100644 --- a/cmd/ipfs2/main.go +++ b/cmd/ipfs2/main.go @@ -6,6 +6,7 @@ import ( "os" "runtime/pprof" + logging "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-logging" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" manet "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr/net" @@ -107,6 +108,8 @@ func handleOptions(req cmds.Request, root *cmds.Command) { if debugBool, ok := debug.(bool); debugBool && ok { u.Debug = true + u.SetAllLoggers(logging.DEBUG) + // if debugging, setup profiling. if u.Debug { ofi, err := os.Create("cpu.prof") -- GitLab