Commit 7ead6607 authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

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

parent 520240d3
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment