Pārlūkot izejas kodu

删除Error打印stack

yjp 3 gadi atpakaļ
vecāks
revīzija
64a01f8733
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. 1 2
      fslog_instance.go

+ 1 - 2
fslog_instance.go

@@ -5,7 +5,6 @@ import (
 	"go.uber.org/zap/zapcore"
 	"os"
 	"path/filepath"
-	"runtime/debug"
 	"strings"
 	"sync"
 )
@@ -75,7 +74,7 @@ func Info(serviceName string, funcName string, callName string, message string)
 func Error(serviceName string, funcName string, callName string, message string) {
 	lazyInitialize()
 	callerFields := getCallerInfoForLog(serviceName, funcName, callName)
-	logger.Error(message+"\n"+string(debug.Stack()), callerFields...)
+	logger.Error(message, callerFields...)
 }
 
 func Debug(serviceName string, funcName string, callName string, message string) {