Fix critical log level
The CRITICAL log level no longer exists and we were logging more than we wanted to.
This commit is contained in:
parent
3ffaf0fcc7
commit
d0e905babe
|
@ -54,7 +54,7 @@ var (
|
|||
// number of pins to pin/unpin/check
|
||||
nPins = 100
|
||||
|
||||
logLevel = "CRITICAL"
|
||||
logLevel = "FATAL"
|
||||
customLogLvlFacilities = logFacilities{}
|
||||
|
||||
consensus = "crdt"
|
||||
|
|
24
logging.go
24
logging.go
|
@ -36,9 +36,9 @@ var LoggingFacilities = map[string]string{
|
|||
// used in ipfs-cluster dependencies, which may be useful
|
||||
// to display. Along with their default value.
|
||||
var LoggingFacilitiesExtra = map[string]string{
|
||||
"p2p-gorpc": "CRITICAL",
|
||||
"p2p-gorpc": "FATAL",
|
||||
"swarm2": "ERROR",
|
||||
"libp2p-raft": "CRITICAL",
|
||||
"libp2p-raft": "FATAL",
|
||||
"raftlib": "ERROR",
|
||||
"badger": "INFO",
|
||||
}
|
||||
|
@ -46,12 +46,20 @@ var LoggingFacilitiesExtra = map[string]string{
|
|||
// SetFacilityLogLevel sets the log level for a given module
|
||||
func SetFacilityLogLevel(f, l string) {
|
||||
/*
|
||||
CRITICAL Level = iota
|
||||
ERROR
|
||||
WARNING
|
||||
NOTICE
|
||||
INFO
|
||||
DEBUG
|
||||
case "debug", "DEBUG":
|
||||
*l = DebugLevel
|
||||
case "info", "INFO", "": // make the zero value useful
|
||||
*l = InfoLevel
|
||||
case "warn", "WARN":
|
||||
*l = WarnLevel
|
||||
case "error", "ERROR":
|
||||
*l = ErrorLevel
|
||||
case "dpanic", "DPANIC":
|
||||
*l = DPanicLevel
|
||||
case "panic", "PANIC":
|
||||
*l = PanicLevel
|
||||
case "fatal", "FATAL":
|
||||
*l = FatalLevel
|
||||
*/
|
||||
logging.SetLogLevel(f, l)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user