Logging stdin/stderr with a daemonized fastcgi process
|Reported by:||tamas||Owned by:||nobody|
|Severity:||Keywords:||daemonize, fastcgi, logging|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||no||Patch needs improvement:||no|
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)
Changed 9 years ago by tamas
comment:1 Changed 9 years ago by Simon G <dev at simon dot net dot nz>
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Ready for checkin
comment:3 Changed 8 years ago by mtredinnick
- Needs documentation set
- Triage Stage changed from Ready for checkin to Accepted