[Python-Dev] Proposed additional keyword argument in logging calls

skip@pobox.com skip at pobox.com
Wed Nov 30 00:53:47 CET 2005


    Vinay> I couldn't think of a good reason why it should be possible to
    Vinay> overwrite these values with values from a user-supplied
    Vinay> dictionary, other than to spoof log entries in some way. 

If the user doesn't need those values and can provide cheap substitutes,
perhaps their computation can be avoided.  I did that recently by inlining
only the parts of logging.LogRecord.__init__ in a subclass and avoided
calling logging.LogRecord.__init__ altogether.  It generated lots of
instance variables we never use and just slowed things down.

Skip


More information about the Python-Dev mailing list