refactor: code review

This commit is contained in:
meilin.huang
2024-01-26 17:17:26 +08:00
parent 7e9a381641
commit 923e183a67
14 changed files with 48 additions and 40 deletions

View File

@@ -116,7 +116,7 @@ func ErrorTrace(msg string, err any) {
default:
errMsg = fmt.Sprintf("%v", t)
}
Log(context.Background(), slog.LevelError, fmt.Sprintf(msg+"\n%s\n%s", errMsg, runtimex.StatckStr(2, 10)))
Log(context.Background(), slog.LevelError, fmt.Sprintf(msg+"\n%s\n%s", errMsg, runtimex.StatckStr(2, 20)))
}
func ErrorWithFields(ctx context.Context, msg string, mapFields map[string]any) {