Merge remote-tracking branch 'origin/errcode' into errcode

This commit is contained in:
withchao 2023-01-12 17:30:56 +08:00
commit 44e6a5570e
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ func init() {
func NewPrivateLog(moduleName string) {
logger = loggerInit(moduleName)
ctxLogger = loggerInit(moduleName)
ctxLogger = ctxLoggerInit(moduleName)
}
func ctxLoggerInit(moduleName string) *Logger {

View File

@ -179,7 +179,7 @@ func SetContextInfo(ctx context.Context, funcName string, logLevel logrus.Level,
funcInfo.FuncName = funcName
funcInfo.Err = err
funcInfo.LogLevel = logLevel
_, file, line, _ := runtime.Caller(0)
_, file, line, _ := runtime.Caller(2)
var s string
i := strings.SplitAfter(file, "/")
if len(i) > 3 {