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