query-logger: support auto reopen