Refactor request time logging