23ff4228 by astaxie

if exist file then read lines err

1 parent d99ae3e3
Showing 1 changed file with 2 additions and 2 deletions
......@@ -139,9 +139,9 @@ func (w *FileLogWriter) DoRotate(rotate bool) error {
w.maxsize_cursize = int(finfo.Size())
w.daily_opendate = time.Now().Day()
if finfo.Size() > 0 {
content, err := ioutil.ReadAll(fd)
content, err := ioutil.ReadFile(w.filename)
if err != nil {
//Do something
fmt.Println(err)
}
w.maxlines_curlines = len(strings.Split(string(content), "\n"))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!