title: Better way to log method calls in Python?
body: <p>We can code out some sort of logging decorator to echo function/method calls like the following:</p>
  
  <pre><code>def log(fn):
      ...
  
  @log
  def foo():
      ...
  
  class Foo(object):
      @log
      def foo(self):
          ...
  
      @log
      def bar(self, a, b):
          ...
  
      @log
      def foobar(self, x, y, z):
          ...
  </code></pre>
  
  <p>But what if we are like to log method calls without putting that many @log in front of each meth definition? Is there some way to just put one decorator above a class definition to make all its method calls decorated/logged? Or are there some other better and interesting ways to do that instead of decorator?</p>