[issue14031] logging module cannot format str.format log messages

2012-02-16 Thread Guido Kollerie
Guido Kollerie added the comment: I see, could this be made to work if I explicitly request a logger instead?: logger = logging.getLogger('my_logger', style='{') logger.info('User {} logged in', username) Maybe even for the root logger: root_lo

[issue14031] logging module cannot format str.format log messages

2012-02-16 Thread Guido Kollerie
New submission from Guido Kollerie : When logging messages with variable data one typically writes: username = 'Guido' logging.info('User %s logged in', username) However Python 3 has support str.format (PEP 3101). If one has adopted str.format for formatting stri