github.com/nshntarora/pop@v0.1.2/logging/const.go (about) 1 package logging 2 3 // Level is the logger level 4 type Level int 5 6 const ( 7 // SQL level is the lowest logger level. It dumps all logs. 8 SQL Level = iota 9 // Debug level dumps logs with higher or equal severity than debug. 10 Debug 11 // Info level dumps logs with higher or equal severity than info. 12 Info 13 // Warn level dumps logs with higher or equal severity than warning. 14 Warn 15 // Error level dumps logs only errors. 16 Error 17 ) 18 19 func (l Level) String() string { 20 switch l { 21 case SQL: 22 return "sql" 23 case Debug: 24 return "debug" 25 case Info: 26 return "info" 27 case Warn: 28 return "warn" 29 case Error: 30 return "error" 31 } 32 return "unknown" 33 }