Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gunicorn - No access logs

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!

like image 398
Creative crypter Avatar asked Apr 07 '18 11:04

Creative crypter


1 Answers

could you try :

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

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

like image 171
matt.LLVW Avatar answered Sep 22 '22 08:09

matt.LLVW