status-go/vendor/github.com/anacrolix/log/init.go

23 lines
379 B
Go
Raw Permalink Normal View History

2024-05-30 08:52:57 +00:00
package log
import (
"os"
)
func init() {
var err error
rules, err = parseEnvRules()
if err != nil {
panic(err)
}
Default = loggerCore{
nonZero: true,
filterLevel: Error,
Handlers: []Handler{DefaultHandler},
}.withFilterLevelFromRules()
Default.defaultLevel, _, err = levelFromString(os.Getenv("GO_LOG_DEFAULT_LEVEL"))
if err != nil {
panic(err)
}
}