If you need to empty a log file (not delete it, but simply remove all content) this is one (simple) way of doing it:

cat /dev/null > logfile