Trying formatting more...
I really want to get formatting to work.
This commit is contained in:
parent
b6182b204a
commit
7baad18daf
|
@ -17,4 +17,5 @@ This is our current version trying to communicate between courier and mailman3.
|
|||
* Testing different way to handle formatting.
|
||||
* Nope used `Format` not `Formater`.
|
||||
* This is not working
|
||||
* Reverting to previous formatting
|
||||
* Reverting to previous formatting
|
||||
* No idea what steps we've gone through to get here.
|
|
@ -17,7 +17,9 @@ 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)
|
||||
formatter = logging.Formatter(FORMAT)
|
||||
logger.setFormatter(formatter)
|
||||
|
||||
|
||||
logger.info('format set to: %s', FORMAT)
|
||||
print('format set to: %s', FORMAT)
|
||||
|
|
Loading…
Reference in New Issue