Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logger 中default 的 calldepth = 3 会导致输出Log 无法定位实际输出 #189

Open
chenxiang105 opened this issue Sep 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@chenxiang105
Copy link

Operating System

mac

Go Version

go version go1.21.0 darwin/arm64

Package Version

latest

Affected Packages

gopkg/util/logger

Expected Behavior

img_v2_6b2e0014-ce7d-418c-8e63-00a90481167g
预期输出实际的logger.CtxInfo 代码所在行数,参考截图中的差异

Actual Behavior

参考截图

Reproduction Steps

gopkg/util/logger/default.go
55行:ll.logger.Output(3, msg)

issue 描述:
第一个参数calldepth 写死了3,输出log永远都是 "logger.go 55 ***"

期望Fix:
支持customized or default value = 4

Other Information

No response

@chenxiang105 chenxiang105 added the bug Something isn't working label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant