title: Flask - how to write werkzeug logs to log file using RotatingFileHandler?
body: <p>I've found some somewhat similar questions, but nothing that directly addresses this. </p>
  
  <p>I'm trying to output all Werkzeug logging to a log file. I can get part of the logging to output to the file, but I cannot seem to capture any errors or anything beyond the basic route/request lines.</p>
  
  <p>Here is what I have. How can I include ALL output from Werkzeug? </p>
  
  <pre><code>if __name__ == '__main__':
      configure_app(app)
      handler=RotatingFileHandler('server_werkzeug.log', maxBytes=10000000, backupCount=5)
      log = logging.getLogger('werkzeug')
      log.setLevel(logging.DEBUG)
      log.addHandler(handler)
  </code></pre>