2👍
Maybe add this command in you docker-compose to fire at startup.
docker logs --tail 1000 -f 'your_container_id_here'
1👍
You did everything right in Django to make your logs visible in docker logs. The only thing that I spotted is that you propagate such logs to the higher-level handler (e.g. gunicorn). You have two options:
The first option is to avoid propagation by setting propagate
to False
:
'loggers': {
'': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
}
},
The other option is to configure your application server to avoid filtering, but this will depend on the configuration of your app server.
- [Django]-How can I set up django not to use in-memory database during unittest?
- [Django]-How to use Django with MongoDB
- [Django]-How can I fix PostgreSQL canceling statement error on Google SQL?
- [Django]-Does restarting celery cause duplicate tasks?
Source:stackexchange.com