-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Adding a hook to allow custom data to the rage line #4
Conversation
This is great, thanks for the pull request. I wanted to add custom options at some point too, so this is neat! I have two suggestions:
|
Excuse me for interrupting... @MatMatt Regarding your second point, why not call it I'll be quiet now. |
@mattmatt - Just to be clear, you are suggesting the return value from the lambda be hash. Correct? Not that the lambda itself should be hash. Although, when I was writing it I had the desire to support multiple I think the hash will help enforce the output of the lograge line. @airblade - I welcome the intrusion because I was really at a loss for a name too which is why it ended up as |
@adamcooper yeah, the lambda return value should be a hash, not the Regarding the name, |
This should be good to go now.
|
Looks awesome, thanks so much! |
Adding a hook to allow custom data to the rage line
This adds a new hook that allows someone to add additional logging onto the one line log.
I realize that this is pretty opinionated gem but I figured there are a couple cases where putting a bit of extra information may be nice. The use case I need it for was to put a bit of information about GC stats run and I wanted to be able to easily grep and look at this data from the log file.
Here is how you would add an extra bit of information to the log line.
This patch also includes specs and doc updates.
BTW, There is another hidden feature in here and that is a fix to issue #1. At least in development mode. It should also work in the case where
rack_cache == false
. This is in it's own commit so you can take one without other.