title: docker-compose: Log to persistent file
body: <p>I know that docker-compose default logs to a file defined by <code>docker inspect --format='{{.LogPath}}' my_container</code>. This file is gone as soon as I kill the container. As I deploy a new version of the image frequently, I loose a lot of log entries. </p>
  
  <p>What I'd like to do is to have my container's log entries stored in a persistent log file, just like regular linux processes use. I can have my deployment script do something like this, but I'm thinking there's a less hack-ish way of doing this: </p>
  
  <pre><code>docker-compose logs -t -f &gt;&gt; output-`date +"%Y-%m-%d_%H%M"`.log'
  </code></pre>
  
  <p>One option would be to configure docker-compsose to log to syslog, but for the time being I'd like to log to a dedicated file.</p>
  
  <p>How have others dealt with the issue of persistent logging? </p>