diff options
| author | msapiro | 2006-05-09 18:46:45 +0000 |
|---|---|---|
| committer | msapiro | 2006-05-09 18:46:45 +0000 |
| commit | a85372821451461a59dff62886438cebaea56b12 (patch) | |
| tree | 9c5675f44a03dea02bb12d2eaefa8aa648a3d62f /scripts/join | |
| parent | bda25c546ef3964a3772c8dc8a3eefdd592ebd31 (diff) | |
| download | mailman-a85372821451461a59dff62886438cebaea56b12.tar.gz mailman-a85372821451461a59dff62886438cebaea56b12.tar.zst mailman-a85372821451461a59dff62886438cebaea56b12.zip | |
- fixed misspelling of propagate in loginit.initialize call in cron/disabled.
(should the cron scripts propagate log messages to stderr?)
- updated scripts/* scripts to use new logging rather than stderr writes.
Diffstat (limited to 'scripts/join')
| -rwxr-xr-x | scripts/join | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/join b/scripts/join index 3faab10ee..b378cc316 100755 --- a/scripts/join +++ b/scripts/join @@ -22,28 +22,33 @@ Called by the wrapper, stdin is the mail message, and argv[1] is the name of the target mailing list. -Errors are redirected to logs/errors. +Errors are redirected to logs/error. """ import sys +import logging import paths from Mailman import Utils from Mailman import mm_cfg +from Mailman import loginit from Mailman.Queue.sbcache import get_switchboard from Mailman.i18n import _ def main(): + # Setup logging to stderr stream and error log. + loginit.initialize(propagate=True) + log = logging.getLogger('mailman.error') try: listname = sys.argv[1] except IndexError: - print >> sys.stderr, _('join script got no listname.') + log.error(_('join script got no listname.')) sys.exit(1) # Make sure the list exists if not Utils.list_exists(listname): - print >> sys.stderr, _('join script, list not found: %(listname)s') + log.error(_('join script, list not found: %(listname)s')) sys.exit(1) # Immediately queue the message for the bounce/cmd qrunner to process. # The advantage to this approach is that messages should never get lost -- |
