Hello, You may want to try asking this on the gunicorn mailing list if you haven't.
Thanks, Collin On Thursday, November 13, 2014 7:35:40 AM UTC-5, Florian Auer wrote: > > Hi > > I wanted to let my gunicorn server to log its config into a dedicated file. > Therefore I added an extra line: > exec ../bin/gunicorn ${DJANGO_WSGI_MODULE}:application \ > --name $NAME \ > --workers $NUM_WORKERS \ > --user=$USER --group=$GROUP \ > --log-level=debug \ > --bind=unix:$SOCKFILE \ > --log-file=$ERRLOG \ > --access-logfile=$LOGFILE \ > --log-config=$CONFLOG # added this line with the \ before > > But when i start the server with supervisorctl i receive a "KeyError" for > the formatters. > Traceback (most recent call last): > File "/webapps/sonar3/tekkoSONAR/../bin/gunicorn", line 11, in <module> > sys.exit(run()) > File > "/webapps/sonar3/lib/python3.3/site-packages/gunicorn/app/wsgiapp.py", > line 74, in run > WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() > File "/webapps/sonar3/lib/python3.3/site-packages/gunicorn/app/base.py", > line 185, in run > super(Application, self).run() > File "/webapps/sonar3/lib/python3.3/site-packages/gunicorn/app/base.py", > line 71, in run > Arbiter(self).run() > File "/webapps/sonar3/lib/python3.3/site-packages/gunicorn/arbiter.py", > line 57, in __init__ > self.setup(app) > File "/webapps/sonar3/lib/python3.3/site-packages/gunicorn/arbiter.py", > line 88, in setup > self.log = self.cfg.logger_class(app.cfg) > File "/webapps/sonar3/lib/python3.3/site-packages/gunicorn/glogging.py", > line 175, in __init__ > self.setup(cfg) > File "/webapps/sonar3/lib/python3.3/site-packages/gunicorn/glogging.py", > line 203, in setup > disable_existing_loggers=False) > File "/usr/local/lib/python3.3/logging/config.py", line 70, in > fileConfig > formatters = _create_formatters(cp) > File "/usr/local/lib/python3.3/logging/config.py", line 103, in > _create_formatters > flist = cp["formatters"]["keys"] > File "/usr/local/lib/python3.3/configparser.py", line 937, in > __getitem__ > raise KeyError(key) > KeyError: 'formatters' > - log file exists > - permissions math > Keeping the --log-config out of the command, everything start correctly. > > Any help / idea welcome > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a8963c3e-9bcd-44bb-bf18-e879c5c1940d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.