I had this question a while back as well but did not see a way to do it so I ended up using this program (which has a few log file options):

http://www.gropp.org/?id=projects&sub=bwm-ng



2012/1/22 Robert WANG <chunyu_5@msn.com>
Hi,
  I am a server support engineer.
Now I want to monitor the whole day or whole week network traffic throught the network port of my Sun Solaris server.
I tried to use the iftop and I found it can show the network traffic in real time , it is cool.
  But how can I re-direct the iftop output to a log file? So that I can analysis some network performace issue.
I have checked man page , did not find any clue.
  Hope for your reply.
  Thank you very much!
Best regards,
Robert WANG