trans_logger: fix potential race