codeberg.org/gruf/go-log@v1.0.6-0.20231202001801-031c3d3d089b/level.go (about) 1 package log 2 3 // LEVEL represents a logging level (e.g. info, warn, ...). 4 type LEVEL uint8 5 6 const ( 7 // Available log levels. 8 NONE LEVEL = 0 9 PANIC LEVEL = 50 10 ERROR LEVEL = 100 11 WARN LEVEL = 150 12 INFO LEVEL = 200 13 DEBUG LEVEL = 250 14 ALL LEVEL = ^LEVEL(0) 15 ) 16 17 // defaultLevels is a lookup table of default log levels. 18 var levels = [int(ALL) + 1]string{ 19 PANIC: "PANIC", 20 ERROR: "ERROR", 21 WARN: "WARN", 22 INFO: "INFO", 23 DEBUG: "DEBUG", 24 }