title: How can I patch / mock logging.getlogger()
body: <p>I have this code that I want to test:</p>
  
  <pre><code>log = logging.getLogger(__name__)
  
  
  class A(object):
      def __init__(self):
          log.debug('Init')
  </code></pre>
  
  <p>but I cannot figure out how to assert that log.debug was called with 'Init'</p>
  
  <p>I tried patching logger but inspecting it I only found a getLogger mock.</p>
  
  <p>I'm sure its simple, but I just cant figure it!</p>
  
  <p>Thanks in advance for any and all help!</p>