title: How do I make python-bottle log send its stdout to a file?
body: <p>Bottle has nice <code>access_log</code> output that I want to log to a file.</p>
  
  <p>How do I use <code>daemon</code> and put that in a file somewhere?</p>
  
  <pre><code>#!/usr/bin/env python
  
  from bottle import route, run
  import daemon
  
  @route('/foo')
  def foo():
    return template('bar')
  
  log = open('/dev/shm/access_log', 'a')
  with daemon.DaemonContext(stdout=log):
    run(host='0.0.0.0', port=8080)
  </code></pre>
  
  <p>It backgrounds and bottle works but I get nothing in <code>/dev/shm/access_log</code>.</p>