diff options
author | tkikuchi <> | 2006-01-19 00:57:35 +0000 |
---|---|---|
committer | tkikuchi <> | 2006-01-19 00:57:35 +0000 |
commit | 5d25658527503857d395a711c18a6e1ab98b9916 (patch) | |
tree | d9c6c78725df05dac0c858a89c148f1eb7b03c09 /bin | |
parent | 2a3818c340bbc53a12dd34d3e1e5a218af6458bd (diff) | |
download | mailman2-5d25658527503857d395a711c18a6e1ab98b9916.tar.gz mailman2-5d25658527503857d395a711c18a6e1ab98b9916.tar.xz mailman2-5d25658527503857d395a711c18a6e1ab98b9916.zip |
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.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/qrunner | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/qrunner b/bin/qrunner index 4162c722..5bf5c66d 100644 --- a/bin/qrunner +++ b/bin/qrunner @@ -66,6 +66,9 @@ Options: 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 +87,6 @@ COMMASPACE = ', ' # 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 +213,12 @@ def main(): 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]) |