title: Logging implementation of getLevelName method
body: <p>According to the Doc <a href="https://docs.python.org/2/library/logging.html" rel="nofollow noreferrer">here</a> and this answer <a href="https://stackoverflow.com/questions/18392804/python-logging-determine-level-number-from-name/18392839#18392839">here</a>, asking for a logLevel of my logger should return one of this levelnames</p>
  
  <pre><code>_levelNames = {
      CRITICAL : 'CRITICAL',
      ERROR : 'ERROR',
      WARNING : 'WARNING',
      INFO : 'INFO',
      DEBUG : 'DEBUG',
      NOTSET : 'NOTSET',
      'CRITICAL' : CRITICAL,
      'ERROR' : ERROR,
      'WARN' : WARNING,
      'WARNING' : WARNING,
      'INFO' : INFO,
      'DEBUG' : DEBUG,
      'NOTSET' : NOTSET,
  }
  </code></pre>
  
  <p>but when I call </p>
  
  <pre><code>print logging.getLevelName("debug")
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>Level debug</p>
  </blockquote>
  
  <p>so I can not in a confortable way do something like:</p>
  
  <pre><code>logger.setLevel(foo)
  </code></pre>
  
  <p>where fo is a string I get from some other method...</p>
  
  <p>Any suggestions why?</p>
  
  <p>Thanks</p>