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/f186205f-8feb-4d32-8d41-7f41a9b9bfdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to