From b1ada803610118fd91f8a996d7848583068e41b5 Mon Sep 17 00:00:00 2001 From: Jigme Datse Yli-Rasku Date: Wed, 29 May 2024 22:57:35 -0700 Subject: [PATCH] Logging port and host on same line Previously it wasn't listing the port (it should be null). --- docs/courier-to-mailman3.md | 3 ++- source/courier-to-mailman3.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/courier-to-mailman3.md b/docs/courier-to-mailman3.md index 8237543..91ac0bd 100644 --- a/docs/courier-to-mailman3.md +++ b/docs/courier-to-mailman3.md @@ -26,4 +26,5 @@ This is our current version trying to communicate between courier and mailman3. * Date format set: * Level and File set in variable * Format had errors with `$` used instead of `%` -* Clean up logging to not log what was logged for logging diagnostics. \ No newline at end of file +* Clean up logging to not log what was logged for logging diagnostics. +* Logging host and port on same line. \ No newline at end of file diff --git a/source/courier-to-mailman3.py b/source/courier-to-mailman3.py index 333f662..19d1946 100644 --- a/source/courier-to-mailman3.py +++ b/source/courier-to-mailman3.py @@ -31,7 +31,7 @@ try: # Setup LTMP connection lmtp_host = sys.argv[3] if len(sys.argv) > 3 else 'localhost' - logger.info('lmtp_host: %s', lmtp_host) + logger.info('lmtp_host: %s lmtp_port: %s', lmtp_host, sysv.arg[1]) # class smtplib.LMTP(host='', port=LMTP_PORT, local_hostname=None, source_address=None) logger.info('lmtp_port: %s', sysv.arg[1]) lmtp = smtplib.LMTP(lmtp_host, int(sys.argv[1]))