[Python-checkins] [3.10] Move field width to the right field (GH-29344) (GH-29351)

vsajip webhook-mailer at python.org
Sun Oct 31 16:25:52 EDT 2021


https://github.com/python/cpython/commit/ed34965d66b11c3bae43b20671aa796299a56451
commit: ed34965d66b11c3bae43b20671aa796299a56451
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: vsajip <vinay_sajip at yahoo.co.uk>
date: 2021-10-31T20:25:44Z
summary:

[3.10] Move field width to the right field (GH-29344) (GH-29351)

Co-authored-by: Olaf van der Spek <olafvdspek at gmail.com>

files:
M Doc/library/logging.rst

diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 9de115a92c293..bb1bbf0e3708c 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -203,7 +203,7 @@ is the module's name in the Python package namespace.
       attributes can then be used as you like. For example, they could be
       incorporated into logged messages. For example::
 
-         FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
+         FORMAT = '%(asctime)s %(clientip)-15s %(user)-8s %(message)s'
          logging.basicConfig(format=FORMAT)
          d = {'clientip': '192.168.0.1', 'user': 'fbloggs'}
          logger = logging.getLogger('tcpserver')
@@ -1000,7 +1000,7 @@ functions.
    be used as you like. For example, they could be incorporated into logged
    messages. For example::
 
-      FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
+      FORMAT = '%(asctime)s %(clientip)-15s %(user)-8s %(message)s'
       logging.basicConfig(format=FORMAT)
       d = {'clientip': '192.168.0.1', 'user': 'fbloggs'}
       logging.warning('Protocol problem: %s', 'connection reset', extra=d)



More information about the Python-checkins mailing list