Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

abhisheknayak_1111's avatar

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 🙏

0 likes
0 replies

Please or to participate in this conversation.