Logging stdin/stderr with a daemonized fastcgi process
Django has a nice daemonizing function django.utils.daemonize.become_daemon, which takes out_log and err_log keyword arguments. django.core.servers.fastcgi makes use of become_daemon, but only the our_home_dir is specified and the out_log and err_log arguments are not being utilized.
This patch proposes adding outlog and errlog as additional fastcgi options so that you can specify files to redirect stderr and stdout to for daemonized fastcgi processes via manage.py runfcgi.
Its a simple change to fastcgi.py. In addition, a line needed to be added to daemonize.py, so that the file descriptors are line buffered for posix systems.
Change History
(5)
| Triage Stage: |
Unreviewed → Ready for checkin
|
| Needs documentation: |
set
|
| Triage Stage: |
Ready for checkin → Accepted
|
| Resolution: |
→ fixed
|
| Status: |
new → closed
|
It seems that the fastcgi.txt file would need to be updated as a result of this change. Other than that, the patch is fine.