lotus/lib/lotuslog/levels.go
Jakub Sztandera d6615b6286
Cleanup many lint warnings
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-05-27 22:53:20 +02:00

23 lines
528 B
Go

package lotuslog
import (
"os"
logging "github.com/ipfs/go-log/v2"
)
//nolint:gosec
func SetupLogLevels() {
if _, set := os.LookupEnv("GOLOG_LOG_LEVEL"); !set {
logging.SetLogLevel("*", "INFO")
logging.SetLogLevel("dht", "ERROR")
logging.SetLogLevel("swarm2", "WARN")
logging.SetLogLevel("bitswap", "WARN")
//logging.SetLogLevel("pubsub", "WARN")
logging.SetLogLevel("connmgr", "WARN")
logging.SetLogLevel("advmgr", "DEBUG")
logging.SetLogLevel("stores", "DEBUG")
logging.SetLogLevel("nat", "INFO")
}
}