Rewriting sensitive information in logs