title: Logging variable data with new format string
body: <p>I use logging facility for python 2.7.3. <a href="http://docs.python.org/2/howto/logging.html" rel="noreferrer">Documentation for this Python version say</a>:</p>
  
  <blockquote>
    <p>the logging package pre-dates newer formatting options such as str.format() and string.Template. These newer formatting options are supported...</p>
  </blockquote>
  
  <p>I like 'new' format with curly braces. So i'm trying to do something like:</p>
  
  <pre><code> log = logging.getLogger("some.logger")
   log.debug("format this message {0}", 1)
  </code></pre>
  
  <p>And get error:</p>
  
  <blockquote>
    <p>TypeError: not all arguments converted during string formatting</p>
  </blockquote>
  
  <p>What I miss here?</p>
  
  <p>P.S. I don't want to use </p>
  
  <pre><code>log.debug("format this message {0}".format(1))
  </code></pre>
  
  <p>because in this case the message is always being formatted regardless of logger level.</p>