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

Added configurable reqlog middleware #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shraddhafalane
Copy link

πŸ“„ What has changed

Enhancement for #79
Configured reqlog middleware to log request IP Address, request Path, headers and params

βœ… Before submitting, please be sure to check this list

  • your branch will not cause merge conflict with main branch
  • unit tests are included
  • the CHANGELOG has been updated
  • you are not committing extraneous files or sensitive data

@shraddhafalane shraddhafalane force-pushed the middleware_enhancement branch from e304c90 to 2bdf2ba Compare August 25, 2022 13:36
@vmihailenco
Copy link
Member

@shraddhafalane thanks for the PR.

I think that having a single option to enable arbitrary number of params is not going to work. Instead, we should create an option for every extra param we want to support.

So I think we should support the following options:

  • WithReferer(bool)
  • WithRemoteAddr(bool)
  • WithQuery(bool)

Also, we should continue to use a single line format since it is much more readable and that is what most users expect.

I suggest we omit "User Agent" and "Body Params" for now since they are quite large and will be hard to display.

What do you think?

@shraddhafalane
Copy link
Author

Hey @vmihailenco committed changes according to your suggestion.

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.

2 participants