Django

Code

Ticket #6687 (closed: fixed)

Opened 9 months ago

Last modified 9 months ago

Logging stdin/stderr with a daemonized fastcgi process

Reported by: tamas Assigned to: nobody
Milestone: Component: Core framework
Version: SVN Keywords: daemonize, fastcgi, logging
Cc: django@jensdiemer.de Triage Stage: Accepted
Has patch: 1 Needs documentation: 1
Needs tests: 0 Patch needs improvement: 0

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

fastcgi-log-routing.diff (1.9 kB) - added by tamas on 02/29/08 15:21:19.

Change History

02/29/08 15:21:19 changed by tamas

  • attachment fastcgi-log-routing.diff added.

03/01/08 15:15:02 changed by Simon G <dev at simon dot net dot nz>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

03/06/08 08:45:47 changed by jedie

  • cc set to django@jensdiemer.de.

03/18/08 09:05:27 changed by mtredinnick

  • needs_docs set to 1.
  • stage changed from Ready for checkin to Accepted.

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.

03/18/08 10:53:48 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #6687 (Logging stdin/stderr with a daemonized fastcgi process)




Change Properties
Action