title: logging doesn't work using wsgi, no file is created
body: <p>I'm running this flask application to test logging. It's running fine on my local system, but if I run it on the apache server using mod_wsgi, it doesn't work. There is no errors, but, no foo.log is created.</p>
  
  <p>I'm using python 3.5</p>
  
  <p>The code looks like this: </p>
  
  <pre><code>from flask import Flask
  import logging
  from logging.handlers import RotatingFileHandler
  
  app = Flask(__name__)
  
  @app.route('/')
  def foo():
      app.logger.warning('A warning occurred (%d apples)', 42)
      app.logger.error('An error occurred')
      app.logger.info('Info')
      return "foo"
  
  if __name__ == '__main__':
      handler = RotatingFileHandler('foo.log', maxBytes=10000, backupCount=1)
      handler.setLevel(logging.INFO)
      app.logger.addHandler(handler)
      app.run(host='0.0.0.0')
  </code></pre>
  
  <p>the wsgi file looks like this: </p>
  
  <pre><code>#!/usr/bin/python
  import sys
  import logging
  logging.basicConfig(stream=sys.stderr)
  sys.path.insert(0,"/var/www/FlaskApp/")
  
  from FlaskApp import app as application
  application.secret_key = 'Add your secret key'
  </code></pre>