Working version logging to a file.

- Abstract over various destination types.
- Abstract over different logging entries. In the future, might want
	to log notes or potentially from other sources (browser, R etc?).