I was wondering if there is a command to clear the log files in Symfony 2 ?
While there is the php app/console cache:clear
to clear the cache, I don't know any command to clear the log files (logs/dev.log and logs/prod.log).
I have always cleared these logs manually.
Thank you
There's no explicit command in Symfony. But using a shell one-liner is nothing to be ashamed of:
# straightforward …
echo -n '' > app/logs/dev.log
# … or l33t
> app/logs/dev.log # works at least in bash, haven't tried others
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With