🎨 修改部分依赖
This commit is contained in:
12
log/say.go
12
log/say.go
@@ -1,6 +1,9 @@
|
||||
package log
|
||||
|
||||
import "go.uber.org/zap"
|
||||
import (
|
||||
"encoding/json"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// Debug uses fmt.Sprint to construct and log a message.
|
||||
func Debug(args ...interface{}) {
|
||||
@@ -73,3 +76,10 @@ func Fatalf(template string, args ...interface{}) {
|
||||
defer zap.S().Sync()
|
||||
zap.S().Fatalf(template, args...)
|
||||
}
|
||||
|
||||
// Pretty provides pretty trace level logging
|
||||
func Pretty(v ...interface{}) {
|
||||
b, _ := json.MarshalIndent(v, "", " ")
|
||||
defer zap.S().Sync()
|
||||
zap.S().Info(string(b))
|
||||
}
|
||||
|
Reference in New Issue
Block a user