I am running gunicorn with the below config
$VIRT_ENV/gunicorn -c config.py utrade.wsgi:application \
--log-level=debug \
--timeout=0 \
--access-logfile=-\
--log-file=-
However it won't log HTTP requests (POST/GET) like Django would do if ran standalone. Like the ones below
INFO:django.server:"GET / HTTP/1.1" 302 0
INFO:django.server:"GET /login/?next=/ HTTP/1.1" 200 5676
Add gunicorn.access in loggers in django settings.py
file in the 'loggers' block.
LOGGING = {
# ..
'loggers': {
# ..
'gunicorn.access' : {
'level': 'DEBUG',
'handlers': ['console'],
'propagate':False
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With