mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
improve stack feature for package gdebug/gerror
This commit is contained in:
@ -9,6 +9,7 @@ package gdebug
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/internal/utils"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
@ -82,6 +83,11 @@ func StackWithFilters(filters []string, skip ...int) string {
|
||||
if strings.Contains(file, stackFilterKey) {
|
||||
continue
|
||||
}
|
||||
if !utils.IsDebugEnabled() {
|
||||
if strings.Contains(file, utils.StackFilterKeyForGoFrame) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if fn := runtime.FuncForPC(pc); fn == nil {
|
||||
name = "unknown"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user