Redirect logs during testing