Add caller (file:line number) to non-tracing entries?
Aperta
- Lingua principale
- Go
- Stelle
- 1.4k
- Fork
- 110
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.