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

Feature Request: Access Log #152

Closed
timkofu opened this issue Dec 5, 2023 · 7 comments · Fixed by #298
Closed

Feature Request: Access Log #152

timkofu opened this issue Dec 5, 2023 · 7 comments · Fixed by #298
Labels
enhancement New feature or request help wanted Extra attention is needed polar
Milestone

Comments

@timkofu
Copy link
Contributor

timkofu commented Dec 5, 2023

Is it within your vision for the project to have an access log similar to Gunicorn's default?

192.168.0.192 - - [05/Dec/2023:09:40:08 +0000] "GET / HTTP/1.1" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@gi0baro
Copy link
Member

gi0baro commented Dec 10, 2023

This is something that will require some analysis, but only after #25 is done

@gi0baro gi0baro added the enhancement New feature or request label Dec 21, 2023
@aeb-dev
Copy link

aeb-dev commented Jan 2, 2024

We also would appreciate such feature

@gi0baro gi0baro changed the title Fueature Request: Access Log Feature Request: Access Log Jan 4, 2024
@gi0baro gi0baro added the help wanted Extra attention is needed label Jan 22, 2024
@nitrag
Copy link

nitrag commented Jan 23, 2024

+1. Also, please support JSON.

@mikeckennedy
Copy link

For what it's worth, I added some middleware for my web app and got what I was hoping plus more with color and all to highlight abnormalities (high latency, size, etc). Just in case others are waiting on something like this to adopt the server. Rolling your own isn't too bad.

colored

It's not an exact replica of the format of gunicorn but I didn't want that anyway.

@nkhitrov
Copy link

nkhitrov commented Feb 8, 2024

@mikeckennedy looks great! Can you share a code example? 🙏

@mikeckennedy
Copy link

Hi @nkhitrov I'm happy to share. Every web framework is a bit different. That log is from Pyramid so is handled through their "Tweens" but more general plugs into whatever middleware stack there is. Here's what generated that out put. I really like the coloring of errors and slow requests differently, etc.

https://gist.github.com/mikeckennedy/6e4f7b9e8bf3771c4b0b5cee6e03b29a

@gi0baro gi0baro added the polar label Mar 11, 2024
@codedoga
Copy link

codedoga commented Apr 5, 2024

+1

gi0baro added a commit that referenced this issue May 23, 2024
gi0baro added a commit that referenced this issue May 23, 2024
@gi0baro gi0baro mentioned this issue May 23, 2024
@gi0baro gi0baro added this to the 1.4 milestone May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed polar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants