Changes

Jump to navigation Jump to search
Line 41: Line 41:  
== Miscellaneous ==
 
== Miscellaneous ==
 
* Use logging.debug('foo %r bar', x) instead of logging.debug('foo %r bar' % x). This is more robust and formatting only happens if we actually log something.
 
* Use logging.debug('foo %r bar', x) instead of logging.debug('foo %r bar' % x). This is more robust and formatting only happens if we actually log something.
 +
* When you catch an exception and want to log it, use traceback.format_exc().
    
== Tools ==
 
== Tools ==
647

edits

Navigation menu