Okay, so if you run the WSGI app above with gunicorn in docker, you'll get invalid json logs.
If you run one instance of it, logs are valid. If you run it so that stdout is to a file (and not a pipe), logs are valid If you set NUMBER_OF_X to 4090 (to account for json array, quote, and newline) logs are valid.
run it like this:
docker run --rm --name guni -v (pwd):/test -w /test -d dylanwh/guni gunicorn --preload -w 25 badlogs
docker exec guni -ti /bin/bash
apt install apache2-utils
ab -c 10 -n 10000 http://localhost:8000/
inspect the output of docker logs guni 2>/dev/null