improve the log writer 1. limit max log size of a line 2.write buffer  first