Add caller (file:line number) to non-tracing entries?
未关闭
- 主要语言
- Go
- 星标
- 1.4k
- 派生
- 110
- PR 合并指标
- 30 天内没有已合并 PR
描述
Any opinions on this? It's available from `runtime.Caller`. Following the current design, it could be enabled by having a function like `log.IncludeCaller(bool)` and then every entry would include a field `caller` with value `file:line number`). Could also implement this as the default log library handles flags, e.g. `log.SetFlags(log.LstdFlags | log.Lshortfile)`.
I'm happy to create a PR for this if you'd like.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。