Add support for logging.
	closes #1