X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Futil%2Fmethod.py;h=24ab75e8d3b9bf79c82cf99b5d4cb2445c42127c;hb=4d2b508926a415a1f347d07349a43138a4c79c1a;hp=c5dc1e68138f20ccd6227a0cc326e5a5f2991929;hpb=f947ffc3bb7509783faee76185ec082c6311ab9f;p=sfa.git diff --git a/sfa/util/method.py b/sfa/util/method.py index c5dc1e68..24ab75e8 100644 --- a/sfa/util/method.py +++ b/sfa/util/method.py @@ -79,12 +79,13 @@ class Method: for name, value, expected in zip(max_args, args, self.accepts): self.type_check(name, value, expected, args) + if self.api.config.SFA_API_DEBUG: + sfa_logger().debug("method.__call__ calling method %s"%methodname) result = self.call(*args, **kwds) - runtime = time.time() - start + runtime = time.time() - start if self.api.config.SFA_API_DEBUG or hasattr(self, 'message'): - msg=getattr(self,'message',"method %s completed in %02f s"%(methodname,runtime)) - sfa_logger().debug(msg) + sfa_logger().debug("method.__call__ %s completed in %02f s (%s)"%(methodname,runtime,getattr(self,'message',"[no-msg]"))) return result