This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 LambertDW
收信人 LambertDW
日期 2009-02-09.16:44:09
SpamBayes Score 8.469748e-06
Marked as misclassified
Message-id <1234197852.95.0.276908828254.issue5192@psf.upfronthosting.co.za>
In-reply-to
内容
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).
历史
日期 用户 动作 参数
2009-02-09 16:44:13LambertDW修改recipients: + LambertDW
2009-02-09 16:44:12LambertDW修改messageid: <1234197852.95.0.276908828254.issue5192@psf.upfronthosting.co.za>
2009-02-09 16:44:10LambertDW链接issue5192 messages
2009-02-09 16:44:09LambertDW创建