Pylons / waitress

Waitress - A WSGI server for Python 3
https://docs.pylonsproject.org/projects/waitress/en/latest/
Other
1.44k stars 164 forks source link

Access logging with waitress #347

Closed iamleek1337 closed 3 years ago

iamleek1337 commented 3 years ago

The docs https://docs.pylonsproject.org/projects/waitress/en/stable/logging.html currently use an archive.org link to paste.translogger, a project where I found the following quotes:

Paste is in maintenance mode (...) Patches are accepted to keep it on life support, but for the most part, please consider using other options.

Source: https://github.com/cdent/paste/blob/master/README.rst

Unless you are already using Paste for something, I would not recommend starting something new with it. It's very out of date and currently only maintained here to keep existing projects that are stuck on it alive.

Source: https://github.com/cdent/paste/issues/54

What is the modern, up-to-date alternative? Or is waitress in maintenance mode, too, and shouldn't be used for new projects?

stevepiercy commented 3 years ago

Waitress is actively developed.

It is common to use a web server proxy in front of waitress for web traffic logging. Consult your web server documentation for logging configuration.

iamleek1337 commented 3 years ago

Thanks for the reply :) I am not using any web server proxy. Accessing my website means directly accessing waitress. Is waitress incompatible with this scenario and requires a web server proxy?

mmerickel commented 3 years ago

It's generally not recommended simply because HTTPS support is only possible by running waitress behind a reverse proxy.

This library [1] is a port of the translogger that you can use as well and I'm sure there are many others.

With respect to the status of this issue, I think I'm going to close it. We'd be happy to accept PRs to improve the docs but otherwise there's nothing actionable here.

[1] https://pypi.org/project/request-id/

iamleek1337 commented 3 years ago

Thanks for the reply. :)

I understand that you're hesitant to add access logging to waitress itself. Makes sense to me: middleware can do this job. However, access logging is an essential feature and in the days of supply-chain-attacks, I'd want this feature to come from a reputable source. So, alternatively, since you're the maintainer of https://github.com/mmerickel/request-id anyway, please consider incorporating it into Pylons as a separate (small) project?