Add log printing to unit test.