I'm using Doctrine and want to log all generated SQL queries.
I know that I could use $q->getSqlQuery()
but I don't want to do that manually each time.
Is there a way to do it automatically?
I'm using Doctrine and want to log all generated SQL queries.
I know that I could use $q->getSqlQuery()
but I don't want to do that manually each time.
Is there a way to do it automatically?
If you turn logging on all queries shoudl be logged to your application log in the log
directory. To do this set logging_enabled
to true in your settings.yml
.
Take a look at Doctrine Profiler and the source of ZF_Debug & Doctrine.