Jul 18, 2025
0
Level 1
Symfony 3.4: dev-*.log being generated in production — how to stop this?
Hi all,
I'm working on an existing Symfony 3.4 application deployed in a production environment. The .env file is already set to APP_ENV=prod, but I’m still seeing both prod-YYYY-MM-DD.log and dev-YYYY-MM-DD.log files being generated in var/logs/.
I expected only prod-.log files to be created in production, so I’m confused why dev-.log is also appearing.
Questions: Is there a bin/console command or some way to enforce the production environment globally?
How can I ensure Symfony doesn’t write dev.log in a production environment?
Any help or insight would be appreciated!
Thanks in advance 🙏
Please or to participate in this conversation.