Keep debug first to avoid iterations

This commit is contained in:
Kishan Mohanbhai Sagathiya 2019-11-25 17:10:46 +05:30
parent a384057d39
commit 3d625184a3

View File

@ -69,7 +69,7 @@ func SetFacilityLogLevel(f, l string) {
// IsLogLevel checks if given string is a valid log level. // IsLogLevel checks if given string is a valid log level.
func IsLogLevel(s string) bool { func IsLogLevel(s string) bool {
for _, level := range []string{"CRITICAL", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"} { for _, level := range []string{"DEBUG", "CRITICAL", "ERROR", "WARNING", "NOTICE", "INFO"} {
if s == level { if s == level {
return true return true
} }