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 {
|
|
|
|
logging.SetLogLevel("*", "INFO")
|
|
|
|
logging.SetLogLevel("dht", "ERROR")
|
|
|
|
logging.SetLogLevel("swarm2", "WARN")
|
|
|
|
logging.SetLogLevel("bitswap", "WARN")
|
2020-03-10 19:44:50 +00:00
|
|
|
//logging.SetLogLevel("pubsub", "WARN")
|
2020-01-19 20:18:35 +00:00
|
|
|
logging.SetLogLevel("connmgr", "WARN")
|
2020-03-18 23:23:28 +00:00
|
|
|
logging.SetLogLevel("advmgr", "DEBUG")
|
|
|
|
logging.SetLogLevel("stores", "DEBUG")
|
2020-01-19 20:18:35 +00:00
|
|
|
}
|
2020-01-08 13:49:34 +00:00
|
|
|
}
|