Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

29
library/log/level.go Normal file
View File

@@ -0,0 +1,29 @@
package log
// Level of severity.
type Level int
// Verbose is a boolean type that implements Info, Infov (like Printf) etc.
type Verbose bool
// common log level.
const (
_debugLevel Level = iota
_infoLevel
_warnLevel
_errorLevel
_fatalLevel
)
var levelNames = [...]string{
_debugLevel: "DEBUG",
_infoLevel: "INFO",
_warnLevel: "WARN",
_errorLevel: "ERROR",
_fatalLevel: "FATAL",
}
// String implementation.
func (l Level) String() string {
return levelNames[l]
}