[issue5192] Update log message formatting.
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- resolution: wont fix - rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5192] Update log message formatting.
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Isn't there a backward compatibility problem? If a message format string contains both %s and {0}, how is logging supposed to know what to use - a % b or a.format(b)? The way to do it is a custom Formatter, as you've indicated. -- nosy: +vsajip resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5192] Update log message formatting.
New submission from David W. Lambert lamber...@corning.com: Allow logger object log message creation methods using ''.format method. have: logger_object.info('%s','lazy is better') logger_object.debug('{0!s}'.format('wasted effort')) want: logger_object.debug('{0}','Lazy') Work'rounds from pep282: if log.isEnabledFor(logging.INFO): hamletStr = hamletDom.toxml() log.info(hamletStr) or install custom Formatter. I presume this is already on the back burner. Incidentally, BufferingFormatter.format uses string += string instead of ''.join(list_of_strings). -- components: Library (Lib) messages: 81461 nosy: LambertDW severity: normal status: open title: Update log message formatting. type: feature request versions: Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com