mirror of
https://gitee.com/johng/gf
synced 2026-07-04 21:03:13 +08:00
add stack filter of goframe module path for logging content
This commit is contained in:
@ -11,6 +11,8 @@ import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/utils"
|
||||
)
|
||||
|
||||
// PrintStack prints to standard error the stack trace returned by runtime.Stack.
|
||||
@ -80,6 +82,10 @@ func StackWithFilters(filters []string, skip ...int) string {
|
||||
continue
|
||||
}
|
||||
|
||||
if strings.Contains(file, utils.StackFilterKeyForGoFrame) {
|
||||
continue
|
||||
}
|
||||
|
||||
if strings.Contains(file, stackFilterKey) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user