format log, fix map id leak