Skip to content

使用NewFilter日志不会输出该行的行号,怎么解决?? #3423

Answered by Waxion
Sejenew asked this question in Q&A
Discussion options

You must be logged in to vote

如果你使用了DefaultCaller = Caller(4)来设置输出调用行号的话,可以试试改用 log.Caller(4+1),我理解是用了New** 就多套了一层 Call中的层级就要加1

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sejenew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants