aio-libs / aio-libs/aiohttp

access logging refactoring

Đang mở
#3,795 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
16.5k
Fork
2.4k
Merge trung bình
17 giờ 22 phút
Pull request đã merge (30 ngày)
212

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.