Move field width to the right field (GH-29344)
https://github.com/python/cpython/commit/ee464322eb5ede56db6b501279f700638c5... commit: ee464322eb5ede56db6b501279f700638c5c9103 branch: main author: Olaf van der Spek <olafvdspek@gmail.com> committer: miss-islington <31488909+miss-islington@users.noreply.github.com> date: 2021-10-31T10:44:23-07:00 summary: Move field width to the right field (GH-29344) Automerge-Triggered-By: GH:vsajip files: M Doc/library/logging.rst diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index ee0276aadcf3d..3f3a8534f54d0 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)
participants (1)
-
miss-islington