title: Why does this snippet fail with ``AttributeError: 'CustomAdapter' object has no attribute 'setLevel'``?
body: <p>I put the following into a file named <code>repro.py</code>, then typed <code>python repro.py</code>.  (I'm using C Python 2.7.5).  It failed with the error in the question.  The source confirms that there is no method of that name on the LoggerAdapter class, but the docs (<a href="http://docs.python.org/2/library/logging.html#logging.LoggerAdapter" rel="nofollow">http://docs.python.org/2/library/logging.html#logging.LoggerAdapter</a>) say there are:</p>
  
  <blockquote>
    <p>In addition to the above, LoggerAdapter supports the following methods of Logger, i.e. debug(), info(), warning(), error(), exception(), critical(), log(), isEnabledFor(), getEffectiveLevel(), <strong>setLevel()</strong>, hasHandlers(). These methods have the same signatures as their counterparts in Logger, so you can use the two types of instances interchangeably.</p>
  </blockquote>
  
  <p>Is this a bug, or am I misunderstanding something?  If the latter, is it indeed possible to use the LoggerAdapter instance as a drop-in replacement for a Logger instance?</p>
  
  <pre><code>import logging logging.basicConfig ()
  
  class CustomAdapter(logging.LoggerAdapter):
      def process(self, msg, kwargs):
          return '[%s] %s' % (self.extra['connid'], msg), kwargs
  
  logger = logging.getLogger(__name__) 
  adapter = CustomAdapter(logger, {'connid': '1234'}) 
  adapter.setLevel (logging.WARN) 
  adapter.warning ("Ahoy matey")
  </code></pre>