add log and comment for dao redirect

All sql should have a log.