inconshreveable / log15

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

skip stack records #131

Closed luigi-riefolo closed 6 years ago

luigi-riefolo commented 7 years ago

The current implementation of CallerStackHandler does not offer an option for skipping trace records from the logging message.

This change introduces a new function arguments skip, which can be used as an index for skipping unwanted trace records starting from the most recent ones.

The new argument is particularly useful if the log15 functionalities are wrapped into a custom function or the user is implementing the log15 interface.

xgfone commented 7 years ago

@luigi-riefolo Hi, I created a PR to allow the user to customize the stack depth to skip. See #128

luigi-riefolo commented 6 years ago

closing as duplicate