Add tests for logging in