For debugging purposes, it's sometimes usefull to print the queries executed by a Symfony2 Command. Here is my tiny piece of code to do it. protected function execute(InputInterface $input, OutputInterface $output) { // your code here // printing sql queries $logger = […]