2020-01-08 13:49:34 +00:00
|
|
|
package lotuslog
|
|
|
|
|
2020-01-19 20:18:35 +00:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
logging "github.com/ipfs/go-log/v2"
|
|
|
|
)
|
2020-01-08 13:49:34 +00:00
|
|
|
|
|
|
|
func SetupLogLevels() {
|
2020-01-19 20:18:35 +00:00
|
|
|
if _, set := os.LookupEnv("GOLOG_LOG_LEVEL"); !set {
|
2020-05-27 23:15:19 +00:00
|
|
|
_ = 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")
|
2020-01-19 20:18:35 +00:00
|
|
|
}
|
2020-01-08 13:49:34 +00:00
|
|
|
}
|