Hello everyone!

We have been investing plenty of personal time and energy for many years to share our knowledge with you all. However, we now need your help to keep this blog running. All you have to do is just click one of the adverts on the site, otherwise it will sadly be taken down due to hosting etc. costs. Thank you.

If you want to see what queries have been run in your application, you can use example below to record the log.


Configuration


# app/config/config_test.yml

monolog:
handlers:
...
...
doctrine:
action_level: debug
type: stream
path: %kernel.logs_dir%/%kernel.environment%_doctrine.log
channels: doctrine
...
...

Listing logs


You can run tail -f app/logs/test_doctrine.log command.