Django

Code

Show
Ignore:
Timestamp:
03/18/08 10:53:46 (10 months ago)
Author:
jacob
Message:

Fixed #6687: added outlog/errlog options to runfcgi. Thanks, tamas.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/servers/fastcgi.py

    r6075 r7297  
    3838  daemonize=BOOL       whether to detach from terminal. 
    3939  pidfile=FILE         write the spawned process-id to this file. 
    40   workdir=DIRECTORY    change to this directory when daemonizing 
     40  workdir=DIRECTORY    change to this directory when daemonizing. 
     41  outlog=FILE          write stdout to this file. 
     42  errlog=FILE          write stderr to this file. 
    4143 
    4244Examples: 
     
    7072    'maxchildren': 50, 
    7173    'maxrequests': 0, 
     74    'outlog': None, 
     75    'errlog': None, 
    7276} 
    7377 
     
    151155            return fastcgi_help("ERROR: Invalid option for daemonize parameter.") 
    152156 
     157    daemon_kwargs = {} 
     158    if options['outlog']: 
     159        daemon_kwargs['out_log'] = options['outlog'] 
     160    if options['errlog']: 
     161        daemon_kwargs['err_log'] = options['errlog'] 
     162 
    153163    if daemonize: 
    154164        from django.utils.daemonize import become_daemon 
    155         become_daemon(our_home_dir=options["workdir"]
     165        become_daemon(our_home_dir=options["workdir"], **daemon_kwargs
    156166 
    157167    if options["pidfile"]: