Zugriffsprotokoll für Gunicorn funktioniert nicht

Ich laufe Gunicorn hinter Ngninx. Ich möchte Fehler in gunicorn in gunicorn-error.log und Zugriffsprotokolle in gunicorn-access.log protokollieren.

Ich habe das Fehlerprotokoll, aber nicht das Zugriffsprotokoll. Was mache ich falsch?

Das ist mein gunicorn.conf.py:

bind = '127.0.0.1:8888'
backlog = 2048
workers = 3
errorlog = '/home/my/logs/gunicorn-error.log'
accesslog = '/home/my/logs/gunicorn-access.log'
loglevel = 'debug'
proc_name = 'gunicorn-my'
pidfile = '/var/run/my.pid'

Dies ist das Skript, um Gunicorn auszuführen:

#!/bin/bash
set -e
ENV=/home/my/env/bin/activate
GUNICORN=gunicorn_django
SETTINGS_PATH=/home/my/app/app/settings
PROJECT_PATH=/home/my/app
CONFROOT=/home/my/app/conf/gunicorn.conf.py

cd $SETTINGS_PATH
source $ENV
export PYTHONPATH=$PROJECT_PATH
exec $GUNICORN app.settings.staging -c $CONFROOT

Es werden sowohl gunicorn-error.log als auch gunicorn-access.log erstellt, aber nur gunicorn-error.log erhält Protokolle, zB:

2012-11-20 11:49:57 [27817] [INFO] Starting gunicorn 0.14.6
2012-11-20 11:49:57 [27817] [DEBUG] Arbiter booted
2012-11-20 11:49:57 [27817] [INFO] Listening at: http://127.0.0.1:8888 (27817)
2012-11-20 11:49:57 [27817] [INFO] Using worker: sync
2012-11-20 11:49:58 [27825] [INFO] Booting worker with pid: 27825
2012-11-20 11:49:58 [27828] [INFO] Booting worker with pid: 27828
2012-11-20 11:49:58 [27830] [INFO] Booting worker with pid: 27830

Was mache ich falsch? Möchte jemand seine gunicorn.conf.py mit Fehlerprotokollen und Zugriffsprotokollen teilen?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage