How to stop Symfony from logging Doctrine's sql queries?

前端 未结 2 381
刺人心
刺人心 2021-01-13 06:19

I have a weird issue, when I checked my app/log/dev.log I can see almost all of my queries in my dev.log being logged in real time:



        
2条回答
  •  野的像风
    2021-01-13 07:06

    I encountered a similar issue with dev.log being generated on prod environment. I figured out from the log entries that what was causing my issue was a scheduled cron job calling a custom symfony command. Modifying the entry to app/console with --env=prod for my crontab since stopped dev.log being generated. i.e.

    app/console --env=prod custom:command 
    

    Must have missed that section of the book :)

提交回复
热议问题