-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Give the library user a method to customize the reportcaller output #887
Comments
@GAZ082 unfortunately no, there's no way to do that currently. |
This definitely needs to implement otherwise, outputs seem very ugly. I am wondering what is hindering you to just truncate last part of caller method path? |
Ignorance? Haha. Have no idea how to work around this. |
There is no actual way to do that from a library user standpoint. The formatting is of file data fields is done at the fomatter level which is not customizable. |
by the way @GAZ082 thanks for your feedback on this feature. |
@dgsb no problem David, than you for being so nice. Looking forward this feature! |
I submitted a solution(#898 ) that I am using, which is expected to meet your needs, but I did not do performance testing. |
Hey, looks handy! Is there any way I can load this up in my local version of logrus? I'm sure some git command to suck your commit up and merge it in my local version? |
@GAZ082 I've added a callback to the json formatter in order to give the user a chance to format the runtime.Frame himself. Would that help you ? |
it's here #909 |
The same customization has been added to the text formatter #911 |
Thank you @dgsb ! Been looking into the commit and could not figure it out how to implement it. Any example would be welcomed! |
Hey. When I enable it i get an absolute path to the code line:
"file":"/home/gabriel/go/src/someprogram/package/subpackage/subpackage.go:303
I just need the last few charactes, ie:
subpackage.go:303
You guys know some way to get this that way?
Thanks!
The text was updated successfully, but these errors were encountered: