Vinay Sajip added the comment:

> but it means that the string formatting is always done

Not if you use logger.isEnabledFor(level) as a guard to avoid unnecessary work 
:-)

> I "forked" logging and am catching exceptions during the string formatting

That might work with Jython and invalidated objects, but in the case of e.g. 
CPython (where the objects can't be invalidated/garbage collected as there is a 
reference to them in the LogRecord for the logged event) I don't see how that 
approach is generally applicable.

----------

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

Reply via email to