Move field width to the right field (GH-29344)

Automerge-Triggered-By: GH:vsajip
This commit is contained in:
Olaf van der Spek 2021-10-31 18:44:23 +01:00 committed by GitHub
parent bc8fd7c9c2
commit ee464322eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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)