title: How to log all Doctrine queries to file?
body: <p>I'm using Doctrine and want to log all generated SQL queries.</p>
  
  <p>I know that I could use <code>$q-&gt;getSqlQuery()</code> but I don't want to do that manually each time.</p>
  
  <p>Is there a way to do it automatically?</p>