fix logger issues

This commit is contained in:
yanghao05
2023-01-30 11:23:04 +08:00
parent c7345f6252
commit f2c893709d
6 changed files with 194 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import (
"log"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
func init() {
@@ -19,6 +20,10 @@ type Logger struct {
logger *zap.SugaredLogger
}
func (l *Logger) LevelWriter(level zapcore.Level) *LevelWriter {
return &LevelWriter{Level: level}
}
// Debug uses fmt.Sprint to construct and log a message.
func Debug(args ...interface{}) {
DefaultLogger.logger.Debug(args...)