apex / apex/log

Add caller (file:line number) to non-tracing entries?

Open
#44 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.4k
Forks
110
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.