[3.9] Move field width to the right field (GH-29344) (GH-29350)
https://github.com/python/cpython/commit/da04bef5f7bcbce48e7e1b8c268b8899a0a... commit: da04bef5f7bcbce48e7e1b8c268b8899a0a42140 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: vsajip <vinay_sajip@yahoo.co.uk> date: 2021-10-31T20:25:21Z summary: [3.9] Move field width to the right field (GH-29344) (GH-29350) Co-authored-by: Olaf van der Spek <olafvdspek@gmail.com> files: M Doc/library/logging.rst diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 1a4c84e4a3a21..e72a898a11363 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') @@ -993,7 +993,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)
-
vsajip