Added TestLogger, so tests can check the right log messages were produced. This was SVN commit r4960.