mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 08:18:03 +08:00
fix IPFS_DEBUG logging
This commit is contained in:
parent
ebdaac7f1e
commit
515505dccb
@ -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"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user