add stack filter of goframe module path for logging content

This commit is contained in:
John Guo
2021-12-10 18:25:28 +08:00
parent 3f24159636
commit e02bdd875d

View File

@ -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
}