log15
log15 copied to clipboard
glog handler for vmodule style filtering
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?
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."
We have implemented and used this in our fork at Ethereum, if anyone's interested https://github.com/ethereum/go-ethereum/tree/master/log