fix bug substr
fix #81
log support file & logrotate