title: Can Python's logging format be modified depending on the message log level?
body: <p>I'm using Python's <code>logging</code> mechanism to print output to the screen.  I could do this with print statements, but I want to allow a finer-tuned granularity for the user to disable certain types of output.  I like the format printed for errors, but would prefer a simpler format when the output level is "info."</p>
  
  <p>For example:</p>
  
  <pre><code>  logger.error("Running cmd failed")
    logger.info("Running cmd passed")
  </code></pre>
  
  <p>In this example, I would like the format of the error to be printed differently:</p>
  
  <blockquote>
  <pre><code># error
  Aug 27, 2009 - ERROR: Running cmd failed
  # info
  Running cmd passed
  </code></pre>
  </blockquote>
  
  <p>Is it possible to have different formats for different log levels without having multiple logging objects?  I'd prefer to do this without modifying the logger once it's created since there are a high number of if/else statements to determine how the output should be logged.</p>