I\'m pretty new to Symfony2, and I\'m looking for a way to log SQL queries (including timings) to the same log file as the rest of my application.
From what I can determ
If you are really sure that you need to log doctrine 2 queries in production then you can set this up in the configs for doctrine.
connections:
# A collection of different named connections (e.g. default, conn2, etc)
default:
# when true, queries are logged to a "doctrine" monolog channel
logging: true
http://symfony.com/doc/current/reference/configuration/doctrine.html
And config monolog to log doctrine like explained in the docs: http://symfony.com/doc/current/cookbook/logging/channels_handlers.html
A similar issue can be found at symfony 2.4 can't get the doctrine channel in prod environment