php.log: what is the proper way to clear log file? php.log: what is the proper way to clear log file? unix unix

php.log: what is the proper way to clear log file?


It is entirely safe to just delete the php.log file. It will be auto-created the next time it is needed.


On Linux you can do :

cat /dev/null > /var/logs/php.log   


On Mac OS X 10.6 I deleted /var/log/apache2/error_log. Minor panic when it didn't re-appear upon refreshing my page. Just had to restart apache by going through the Sharing settings. Now she's back.