Bruno P. Kinoshita <brunodepau...@yahoo.com.br> added the comment:

I think this needs a script to reproduce the problem.

Tested first with Anaconda Python 3.7.1 on Win10 Pro. Not able to reproduce the 
issue. Smae with the latest version.

Using Python master and Win10Pro and timezone set to NZ (not that really 
matter, but just in case).

    Python 3.9.0a1+ (heads/master:2fe4c48917, Dec  2 2019, 14:12:32) [MSC 
v.1916 64 bit (AMD64)] on win32

with the example from https://docs.python.org/3/library/logging.html:

    import logging
    FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
    logging.basicConfig(format=FORMAT)
    d = {'clientip': '192.168.0.1', 'user': 'fbloggs'}
    logger = logging.getLogger('tcpserver')
    
    logger.warning('Protocol problem: %s', 'connection reset', extra=d)

Gives:

    2019-12-02 14:14:46,615 192.168.0.1 fbloggs  Protocol problem: connection 
reset

If I modify the example to use just %(asctime)s


    import logging
    FORMAT = '%(asctime)s'
    logging.basicConfig(format=FORMAT)
    d = {'clientip': '192.168.0.1', 'user': 'fbloggs'}
    logger = logging.getLogger('tcpserver')
    
    logger.warning('Protocol problem: %s', 'connection reset', extra=d)

Now gives:

    2019-12-02 14:18:29,047

Everything looks OK, at least on my environment.

----------
nosy: +kinow

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38720>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to