|
|
@@ -1,6 +1,7 @@
|
|
|
package fslog
|
|
|
|
|
|
import (
|
|
|
+ "fmt"
|
|
|
"go.uber.org/zap"
|
|
|
"go.uber.org/zap/zapcore"
|
|
|
"os"
|
|
|
@@ -71,9 +72,10 @@ func Info(serviceName string, funcName string, callName string, message string)
|
|
|
logger.Info(message, callerFields...)
|
|
|
}
|
|
|
|
|
|
-func Error(serviceName string, funcName string, callName string, message string) {
|
|
|
+func Error(serviceName string, funcName string, callName string, err error) {
|
|
|
lazyInitialize()
|
|
|
callerFields := getCallerInfoForLog(serviceName, funcName, callName)
|
|
|
+ message:= fmt.Sprintf("\n%+v\n", err)
|
|
|
logger.Error(message, callerFields...)
|
|
|
}
|
|
|
|