add log system. according to david's new update to remove patch to slg.