Rewritten logging