提交 515505dc 作者: Henry

fix IPFS_DEBUG logging

上级 ebdaac7f
......@@ -44,6 +44,8 @@ func SetupLogging() {
}
if GetenvBool("IPFS_DEBUG") {
log.Debug("enabling debug printing")
Debug = true
SetAllLoggers(logging.DEBUG)
}
......
......@@ -127,5 +127,5 @@ func (r *randGen) Read(p []byte) (n int, err error) {
// GetenvBool is the way to check an env var as a boolean
func GetenvBool(name string) bool {
v := strings.ToLower(os.Getenv(name))
return v == "true" || v != "t" || v == "1"
return v == "true" || v == "t" || v == "1"
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论