I want to log to stdout all Django debug logs, the app is running in gunicorn using Docker.
Django config for logging:
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'console': {
'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
},
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django': {
'handlers': ['console'],
'level': 'DEBUG', # change debug level as appropiate
'propagate': True,
},
}
}
And Im starting gunicorn with
gunicorn --bind 0.0.0.0:80 --log-level "debug" --capture-output --enable-stdio-inheritance tls.wsgi