@cryptotaxi247 / kubo / commits / 7ead66073

cmd/ipfs2: Set all loggers to DEBUG level when running with 'debug' flag

Matt Bell committed Nov 6, 2014 at 17:10 UTC 7ead660738a855052660564967eba841917f86d9
1 file changed +3
cmd/ipfs2/main.go
+3
@@ -6,6 +6,7 @@ import (
6 "os"
7 "runtime/pprof"
8
9 + logging "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-logging"
10 ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
11 manet "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr/net"
12
@@ -107,6 +108,8 @@ func handleOptions(req cmds.Request, root *cmds.Command) {
108 if debugBool, ok := debug.(bool); debugBool && ok {
109 u.Debug = true
110
111 + u.SetAllLoggers(logging.DEBUG)
112 +
113 // if debugging, setup profiling.
114 if u.Debug {
115 ofi, err := os.Create("cpu.prof")