Update of /cvsroot/mailman/mailman/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11695

Modified Files:
        qrunner 
Log Message:
http://mail.python.org/pipermail/mailman-developers/2006-January/018548.html
Before we startup qrunners, we redirect the stderr to mailman syslog.
We assume !AS_SUBPROC is running for debugging purpose and don't
log errors in mailman logs/error but keep printing to stderr.


Index: qrunner
===================================================================
RCS file: /cvsroot/mailman/mailman/bin/qrunner,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -d -r2.10 -r2.11
--- qrunner     27 Aug 2005 01:54:03 -0000      2.10
+++ qrunner     19 Jan 2006 01:06:23 -0000      2.11
@@ -1,6 +1,6 @@
 #! @PYTHON@
 
-# Copyright (C) 2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2006 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -14,7 +14,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
 
 """Run one or more qrunners, once or repeatedly.
 
@@ -66,6 +67,9 @@
 
 runner is required unless -l or -h is given, and it must be one of the names
 displayed by the -l switch.
+
+Note also that this script should be started up from mailmanctl as a normal
+operation.  It is only useful for debugging if it is run separately.
 """
 
 import sys
@@ -84,8 +88,6 @@
 # Flag which says whether we're running under mailmanctl or not.
 AS_SUBPROC = 0
 
-LogStdErr('error', 'qrunner', manual_reprime=0)
-
 
 
 def usage(code, msg=''):
@@ -212,6 +214,12 @@
     if len(runners) == 0:
         usage(1, _('No runner name given.'))
 
+    # Before we startup qrunners, we redirect the stderr to mailman syslog.
+    # We assume !AS_SUBPROC is running for debugging purpose and don't
+    # log errors in mailman logs/error but keep printing to stderr.
+    if AS_SUBPROC:
+        LogStdErr('error', 'qrunner', manual_reprime=0, tee_to_real_stderr=0)
+
     # Fast track for one infinite runner
     if len(runners) == 1 and not once:
         qrunner = make_qrunner(*runners[0])

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to