tags:

views:

126

answers:

2

im using Doctrine and want to log all generated sql queries.

i know that i could use $q->getSqlQuery() but i dont want to do that manually each time.

is there a way to do it automatically?

thanks

+2  A: 

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.

prodigitalson
+2  A: 

Take a look at Doctrine Profiler and the source of ZF_Debug & Doctrine.

takeshin