开发者

How to log all Doctrine queries to file?

I'm using Doctrine and want to log all generated SQL queries.

I know tha开发者_StackOverflow社区t 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜