add zap logger

This commit is contained in:
zhiqiang feng
2020-12-28 15:58:00 +08:00
parent c06ec0a519
commit 0619229ec5
10 changed files with 82 additions and 49 deletions
+3 -1
View File
@@ -3,6 +3,8 @@ package utils
import (
"regexp"
"strings"
"go.uber.org/zap"
)
const (
@@ -27,7 +29,7 @@ func check() {
telegram := exp.FindString(string(buffer))
if len(telegram) > 0 {
Log.Infof("telegram : %s", telegram)
Log.Info("telegram ", zap.String("text", telegram))
buffer = nil
InsertTelegram(telegram)
}