diff --git a/docs/courier-to-mailman3.md b/docs/courier-to-mailman3.md index 663eaba..52f883b 100644 --- a/docs/courier-to-mailman3.md +++ b/docs/courier-to-mailman3.md @@ -11,4 +11,7 @@ This is our current version trying to communicate between courier and mailman3. * Which I screwed up. I think I was typing in the wrong window. * It's not failing on command line. * Still failing, let's get some logging. - * Moved logging initialization, and included print statements \ No newline at end of file + * Moved logging initialization, and included print statements. + * OK, it's logging now (it may have been but not in the right location) + * It wasn't formatting correctly. +* Testing different way to handle formatting. \ No newline at end of file diff --git a/source/courier-to-mailman3.py b/source/courier-to-mailman3.py index 9e7cfdb..e87f3b7 100644 --- a/source/courier-to-mailman3.py +++ b/source/courier-to-mailman3.py @@ -17,7 +17,7 @@ logger = logging.getLogger(__name__) logging.basicConfig(filename='/opt/mailman/logs/courier-to-mailman.log', level=logging.INFO) FORMAT = '%(asctime)s %(clientip)-15s %(user)-8s %(message)s' -logging.basicConfig(format=FORMAT) +logger.Format(FORMAT) logger.info('Starting Logging (outside try)') print('Starting Logging (outside try)')