inconshreveable / log15

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

glog handler for vmodule style filtering #126

Open karalabe opened 7 years ago

karalabe commented 7 years ago

Google's glog logger supports a few interesting features, such as log level control based on path patterns as well as generating backlogs at certain log positions. These can be really useful when we want to raise the log level of only some packages, or even some file to debug some issues.

I already have all this implemented as a log15 handler. Would there be any interest in merging such a feature upstream?

decibel commented 6 years ago

I've pondered that kind of logging ability as well. In addition to a file filter, I've pondered a filter based on function name. I've also thought about adding some notion of callstack support, so you could do something like "Give me DEBUG output for function Foo() and everything Foo() calls, up to 3 level down."

karalabe commented 5 years ago

We have implemented and used this in our fork at Ethereum, if anyone's interested https://github.com/ethereum/go-ethereum/tree/master/log