提交 2473d2d7 作者: Brian Tiger Chow 提交者: Juan Batiz-Benet

refactor(ipfs2/main) same for debug

上级 28be8a61
......@@ -134,13 +134,15 @@ func handleOptions(req cmds.Request, root *cmds.Command) {
exit(0)
}
if debug, err := req.Option("debug").Bool(); debug && err == nil {
u.Debug = true
u.SetAllLoggers(logging.DEBUG)
} else if err != nil {
debug, err := req.Option("debug").Bool()
if err != nil {
fmt.Println(err)
exit(1)
}
if debug {
u.Debug = true
u.SetAllLoggers(logging.DEBUG)
}
}
func callCommand(req cmds.Request, root *cmds.Command) cmds.Response {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论