inconshreveable / log15

Structured, composable logging for Go
https://godoc.org/github.com/inconshreveable/log15
Other
1.1k stars 145 forks source link

CallerFileHandler should include package name #171

Open akamensky opened 2 years ago

akamensky commented 2 years ago

Currently if logger is passed to another package it would still show only a file name within that package.

This may cause issues with finding correct file (there may be identically named files in different packages).

It can be worked around by chaining CallerFileHandler with CallerFuncHandler. Both are lacking in functionality. CallerFuncHandler will only show function name with package name, but not file line in this function. CallerFileHandler will show file name with line, but not package.