version 0.1.0

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2020-06-28 17:18:02 +08:00
parent 9960f402bc
commit ecc1665912
7 changed files with 272 additions and 99 deletions
+6 -2
View File
@@ -8,6 +8,10 @@ import (
"go.uber.org/zap/zapcore"
)
const (
Prefix = "[x]: "
)
var (
formatLogger *zap.SugaredLogger
levelMap = map[string]zapcore.Level{
@@ -20,8 +24,8 @@ var (
}
)
func InitLog() {
logger := newLogger("debug")
func InitLog(level string) {
logger := newLogger(level)
formatLogger = logger.Sugar()
}