title: python logging in django
body: <p>I am using the basic python logger in django and it seems to be workng well. I have the logging setup in my setting.py as;    </p>
  
  <pre><code>logging.baseConfig(level = logging.NOTSET,    
                     format='a format',    
                     datemt=' a datefmt',    
                     filename='path to log',    
                     filemode = 'a')    
  logging.getLogger('').setLevel(logging.NOTSET)    
  </code></pre>
  
  <p>My question is with regard to propagating exceptions. In my code if I have a try/except clause and catch the exception so I can log it, what is the best way to then propagate that error so that I can redirect to my 500 page. I have been using</p>
  
  <pre><code>try:
      do stuff
  except Exception, e:
      logging.error(e)
      raise
  </code></pre>
  
  <p>but I find that this causes the exeption to be logged twice. Is there another way to do this or am I doing something wrong?</p>
  
  <p>Regards<br>
  Andrew</p>