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

support some extra context in RequestLogging #3

Open
olliebun opened this issue Mar 12, 2020 · 1 comment
Open

support some extra context in RequestLogging #3

olliebun opened this issue Mar 12, 2020 · 1 comment

Comments

@olliebun
Copy link

I'd like to be able to ask of the request logger:

include this value from the rack env in log messages

Or:

include this header from requests or responses in log messages

Or:

call this proc/lambda/block every time you log to let me customize log messages

This would allow us to nicely implement something like greensync/greensync-static-site#7

The base logger API exposed by this gem supports that kind of thing easily - but I can't think of a nice way to do this with the RequestLogging class as it is today.

@mdub
Copy link
Owner

mdub commented Mar 12, 2020

Well, I'd figured one could always subclass RequestLogging, and override/extend the #request_details and #response_details methods. Does that do the trick?

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

No branches or pull requests

2 participants