Opened 17 years ago

Closed 17 years ago

#6687 closed (fixed)

Logging stdin/stderr with a daemonized fastcgi process

Reported by: Tamas Kemenczy Owned by: nobody
Component: Core (Other) Version: dev
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

Description

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.

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

by Tamas Kemenczy, 17 years ago

Attachment: fastcgi-log-routing.diff added

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

Triage Stage: UnreviewedReady for checkin

comment:2 by jedie, 17 years ago

Cc: django@… added

comment:3 by Malcolm Tredinnick, 17 years ago

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 by Jacob, 17 years ago

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