14 lines
219 B
Go
14 lines
219 B
Go
|
package logger
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
|
||
|
"go.uber.org/zap"
|
||
|
)
|
||
|
|
||
|
// Warn ...
|
||
|
func Warn(content string, data LogData) {
|
||
|
jsonData, _ := json.Marshal(data)
|
||
|
zapLogger.Warn(content, zap.String("data", string(jsonData)))
|
||
|
}
|