django/python logging with gunicorn: how does django logging work with gunicorn
The gunicorn logs will tell you a report on how the workers are being spawned and closed and their socket errors if any. Assuming you are question the django app logs, where you actually decide what you want to log and to which specific file, the workers are allowed to write the logs one-after-the-other i.e also thread safe, will never right over the other.
But this has its issues if you are trying to loggerate your logs e.g https://justinmontgomery.com/rotating-logs-with-multiple-workers-in-django
I have a Django/Python application deployed(using gunicorn) with 9 workers with 5 thread each. Let's say if on a given time 45 requests are getting processed, Each thread is writing a lot of logs. How Django avoids writing logs for multiple threads at the same time? And how the file open and close works for each request(does this happen at each request, if yes, any other efficient way of logging)?