Gunicorn - No access logs

Creative crypter picture Creative crypter · Apr 7, 2018 · Viewed 24k times · Source

currently i am running my sanic(microframework) webservice with gunicorn as a daemon and i would like to save all logs in files(access and error)

My config:

reload = True
daemon = True
bind = '0.0.0.0:6666'
worker_class = 'sanic.worker.GunicornWorker'
loglevel = 'debug'
accesslog = 'access.log'
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
errorlog = 'error.log'

Next i start the webservice:

gunicorn --config config.py app:app

Sooo.. my errorlog works, but i get absolutely no accesslogs..

There is no hint in the documentation about this issue, could anybody help me?

Thanks and Greetings!

Answer

matt.LLVW picture matt.LLVW · Apr 7, 2018

could you try :

gunicorn --config config.py app:app --access-logfile '-'

And see if anything is logged on stdout(console output)?