Refactored logging for test runners