Opened 11 years ago

Closed 11 years ago

#6687 closed (fixed)

Logging stdin/stderr with a daemonized fastcgi process

Reported by: Tamas Kemenczy Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: daemonize, fastcgi, logging
Cc: django@… Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: 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 runfcgi.

Its a simple change to In addition, a line needed to be added to, so that the file descriptors are line buffered for posix systems.

Attachments (1)

fastcgi-log-routing.diff (1.9 KB) - added by Tamas Kemenczy 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by Tamas Kemenczy

Attachment: fastcgi-log-routing.diff added

comment:1 Changed 11 years ago by Simon G <dev at simon dot net dot nz>

Triage Stage: UnreviewedReady for checkin

comment:2 Changed 11 years ago by jedie

Cc: django@… added

comment:3 Changed 11 years ago by Malcolm Tredinnick

Needs documentation: set
Triage Stage: Ready for checkinAccepted

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.

comment:4 Changed 11 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [7297]) Fixed #6687: added outlog/errlog options to runfcgi. Thanks, tamas.

Note: See TracTickets for help on using tickets.
Back to Top