title: How to debug django with logging on Apache?
body: <p>I have deployed my django site on Apache and there's a problem which did not occur on my development machine, so I want to print some variables out to see what is happening. </p>
  
  <p>I tried to use python logging module, where I did this:</p>
  
  <pre><code>import os, logging
  FILE = os.getcwd()
  logging.basicConfig(filename=os.path.join(FILE,'log.txt'),level=logging.DEBUG)  
  logging.debug('Write')
  </code></pre>
  
  <p>On my development machine there could be a log.txt showing up in the root directory in my django project. However when I did the same thing, there is not log.txt file showing up in the corresponding directory on my server.</p>
  
  <p>Does anyone know how to debug it? Thanks!</p>