Produce a log file for the collection

This is a port of the collection.log file that the desktop client produces.
Merge pull request #459 from hssm/collection-log

Produce a log file for the collection