Add gencode util, fix multiple log binding