aio-libs / aio-libs/aiohttp

access logging refactoring

Ouverte
#3,795 8 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Python
Étoiles
16.5k
Forks
2.4k
Merge moyen
17 h 22 min
PR mergées (30 j)
212

Description

## Long story short

Now `access_log_class`, `access_log` and `access_log_format` are used by public API to control access logger settings.

It is a design mistake, sorry.

The proposal is:
1. deprecate `access_log_class` and `access_log_format` parameters
2. deprecate `logging.Logger` value for `access_log`
3. accept `AbstractAsyncAccessLogger` as `access_log` parameter.
4. process `access_log=None` as default, keep the default behavior as is now
5. move access logger creation logic from `web_protocol.py` to `web_runner.py`
6. explicitly deprecate access logging params in `web_server` as well.

The API uses too much `kwargs` now, backward-compatible changes are possible but need very careful review. All existing public API for access log setup should work in aiohttp 4.0 and can be removed in 5.0

The issue requires a lot of work.
I'm happy to review it but have no capacity to do it myself in a few months.
We are looking for a champion :)

See also #3777 and #3767

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.