title: Determining if root logger is set to DEBUG level in Python?
body: <p>If I set the logging module to DEBUG with a command line parameter like this:</p>
  
  <pre><code>if (opt["log"] == "debug"):
    logging.basicConfig(level=logging.DEBUG)
  </code></pre>
  
  <p>How can I later tell if the logger was set to DEBUG?  I'm writing a decorator that
  will time a function if True flag is passed to it, and if no flag is given, it defaults
  to printing timing information when the root logger is set to DEBUG.</p>