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