mirror of
https://github.com/python/cpython.git
synced 2026-01-21 06:40:15 +00:00
Use PEP-8 style in logging example
This commit is contained in:
parent
da563bfa48
commit
d6a80ee2c7
1 changed files with 1 additions and 1 deletions
|
|
@ -138,7 +138,7 @@ instantiated directly, but always through the module-level function
|
|||
|
||||
FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
|
||||
logging.basicConfig(format=FORMAT)
|
||||
d = { 'clientip' : '192.168.0.1', 'user' : 'fbloggs' }
|
||||
d = {'clientip': '192.168.0.1', 'user': 'fbloggs'}
|
||||
logger = logging.getLogger('tcpserver')
|
||||
logger.warning('Protocol problem: %s', 'connection reset', extra=d)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue