github.com/nsqio/nsq@v1.3.0/apps/nsqadmin/options.go (about) 1 package main 2 3 import ( 4 "fmt" 5 6 "github.com/nsqio/nsq/internal/lg" 7 ) 8 9 type config map[string]interface{} 10 11 // Validate settings in the config file, and fatal on errors 12 func (cfg config) Validate() { 13 if v, exists := cfg["log_level"]; exists { 14 var t lg.LogLevel 15 err := t.Set(fmt.Sprintf("%v", v)) 16 if err == nil { 17 cfg["log_level"] = t 18 } else { 19 logFatal("failed parsing log_level %+v", v) 20 } 21 } 22 }