aio-libs / aio-libs/aiohttp

access logging refactoring

Offen
#3,795 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Python
Sterne
16.5k
Forks
2.4k
Ø Merge
17 Std. 22 Min.
Gemergte PRs (30 T.)
212

Beschreibung

## 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.