reduce log file size

By default, log file can be a few GB.
Reduce the log frequency and implement log rotation.
enable log-rotation

- fixed a bug that log rotation is not properly working
Merge pull request #263 from crest-cassia/reduce_log_file

reduce log file size