Added logging support. Closes #3.