mirror of https://github.com/python/cpython
Move field width to the right field (GH-29344)
Automerge-Triggered-By: GH:vsajip
This commit is contained in:
parent
bc8fd7c9c2
commit
ee464322eb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue