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
FEATURE: Linkify backtrace lines to github #104
Conversation
Can we make the link a bit more subtle? maybe a simple icon? Also I wonder if we should also allow for a very simple local file viewer? Then you can click on any file at all and show it if it is available on local? |
Are you thinking something like this? Or maybe put the icon to the left? Or perhaps we could make the link color the same as everything else and just keep the underlining? Yeah I think it makes sense to have local file viewer as a fallback option that can be turned on or off. If we can't figure out the Github link, we fallback to showing the file locally if it's turned on. |
I like the link to the right, also maybe the |
Looks good to me now! Yeah lets try this out! |
This PR adds a new feature that allows Logster to make each backtrace line link to the correct file and line on Github. This PR also truncates backtrace lines from gems to reduce noise (you can click on ... next to each line to expand).
The way this works is you need to provide Logster with an array of hashes where each hash represents a directory/repository path on the file system and a Github link of the repository.
For example if you're using Logster with a Rails app, your Logster configuration for this feature may look like this:
Additionally, you can add a
main_app: true
key to the hash to indicate that Logster should use the current value of theapplication_version
config when generating Github links. That way the Github links will point to the exact version of your app when the error occurred. If this key is not given in the hash, Logster will use themaster
branch.Screenshot: