소스 검색

删除Error打印stack

yjp 3 년 전
부모
커밋
64a01f8733
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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) {