Use PEP-8 style in logging example

This commit is contained in:
Jason R. Coombs 2012-03-07 10:26:08 -05:00
parent c3705d3ac4
commit 30b8e5461d
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,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)