New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for depth range to CallerDataConverter #222
Add support for depth range to CallerDataConverter #222
Conversation
Thanks for the contribution, @jakubjanecek. Please add a comment here with release notes (see rule P7 of CONTRIBUTING.md). |
Please add another patch to this PR that updates the documentation as you indicated in your comment. Thanks. |
Release notes: Add support for depth range to |
I have updated the PR based on your feedback. Hope all is fine now. Thanks. |
Please squash your intermediate commit (see rule P5 of CONTRIBUTING.md). |
The caller converter of the pattern layout supports specification of depth which changes the number of levels it writes out from the stack trace. If you need to skip some levels and write out a range of stack trace elemens you cannot do so. This commit adds support for ranges using the double dot ("..") notation. It can be useful while using for example Scala traits to simplify logging which causes the file and line number to be incorrect. This way the user can see the actual place where logging was called.
ee2f5fb
to
24b253f
Compare
Fine now? |
Thanks for squashing, but it looks like you need to rebase your patch so that it doesn't include the other unrelated commits. |
c825610
to
24b253f
Compare
OK, now it only contains my own commit. I thought it would be wise to merge newer commits from master to prevent conflicts. |
…port Add support for depth range to CallerDataConverter
The caller converter of the pattern layout supports specification
of depth which changes the number of levels it writes out
from the stack trace. If you need to skip some levels and write out
a range of stack trace elemens you cannot do so. This commit adds
support for ranges using the double dot ("..") notation. It can be useful
while using for example Scala traits to simplify logging which causes
the file and line number to be incorrect. This way the user can see
the actual place where logging was called.
Documentation update (http://logback.qos.ch/manual/layouts.html#caller):
A range specifier can be added to the caller conversion specifier's options to configure the depth range of the information to be displayed.
For example,
%caller{1..2}
would display the following excerpt: