Skip to content
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

Merged
merged 1 commit into from Dec 28, 2014

Conversation

jakubjanecek
Copy link
Contributor

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:

0    [main] DEBUG - logging statement 
Caller+0   at mainPackage.sub.sample.Bar.createLoggingRequest(Bar.java:17)

@tony19
Copy link
Contributor

tony19 commented Dec 20, 2014

Thanks for the contribution, @jakubjanecek. Please add a comment here with release notes (see rule P7 of CONTRIBUTING.md).

@tony19
Copy link
Contributor

tony19 commented Dec 20, 2014

Please add another patch to this PR that updates the documentation as you indicated in your comment. Thanks.

@jakubjanecek
Copy link
Contributor Author

Release notes:

Add support for depth range to CallerDataConverter

@jakubjanecek
Copy link
Contributor Author

I have updated the PR based on your feedback. Hope all is fine now. Thanks.
When can I expect a release with this feature?

@tony19
Copy link
Contributor

tony19 commented Dec 21, 2014

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.
@jakubjanecek
Copy link
Contributor Author

Fine now?

@tony19
Copy link
Contributor

tony19 commented Dec 23, 2014

Thanks for squashing, but it looks like you need to rebase your patch so that it doesn't include the other unrelated commits.

@jakubjanecek
Copy link
Contributor Author

OK, now it only contains my own commit. I thought it would be wise to merge newer commits from master to prevent conflicts.

tony19 added a commit that referenced this pull request Dec 28, 2014
…port

Add support for depth range to CallerDataConverter
@tony19 tony19 merged commit 2a8d2c3 into qos-ch:master Dec 28, 2014
tony19 added a commit that referenced this pull request Dec 28, 2014
@jakubjanecek jakubjanecek deleted the callerDataConverterRangeSupport branch January 5, 2015 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants