title: How to input variables in logger formatter?
body: <p>I currently have:</p>
  
  <pre><code>FORMAT = '%(asctime)s - %(levelname)s - %(message)s'
  logging.basicConfig(format=FORMAT, datefmt='%d/%m/%Y %H:%M:%S', filename=LOGFILE, level=getattr(logging, options.loglevel.upper()))
  </code></pre>
  
  <p>... which works great, however I'm trying to do:</p>
  
  <pre><code>FORMAT = '%(MYVAR)s %(asctime)s - %(levelname)s - %(message)s'
  </code></pre>
  
  <p>and that just throws keyerrors, even though <code>MYVAR</code> is defined. </p>
  
  <p>Is there a workaround? <code>MYVAR</code> is a constant, so it would be a shame of having to pass it everytime I invoke the logger.</p>
  
  <p>Thank you!</p>