I want to programmatically clear manual log-files in order to always only see the new Logging Code for the last iteration.
Is it possible (e.g. via a parameter) to only log the last iteration with the call
Mage::log("My Test Log", null, "test.log")
Or do I always have to manually delete the content of my manual log files?
Do you have a good idea, how can I achieve this with minimum effort?
Best Answer
I think You can use
unlink
command of php it will delete your old file andMage::log
will always create a new filehere is
php Manual url
http://php.net/manual/en/function.unlink.php