kopf icon indicating copy to clipboard operation
kopf copied to clipboard

Afford configuration of aiohttp logging

Open mattupstate opened this issue 3 years ago • 0 comments

Problem

When working on an operator, or a system that includes an operator, I like to use something like skaffold for a reasonable local development experience. When using the skaffold dev command I am able to easily see logs of the pods I've deployed. However, when the logs are cluttered with aiohttp.access logs for the health endpoint it's hard to scan the logs from my own code. I'd rather not have to configure a detail of kopf "from the outside" because it's possible kopf could change the internal health probe implementation.

Proposal

Afford the end user to configure the access logging without having to understand the internal details of kopf. In my case, I want to be able to disable the aiohttp.access log entirely. Beyond that, I might want to be able to specify a format of sorts.

Workaround

The only way I have figured out how to disable the aiohttp.access log is to disable propagation:

logging.getLogger("aiohttp.access").propagate = False

Code

No response

Additional information

No response

mattupstate avatar Nov 18 '22 01:11 mattupstate