mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 22:30:49 +00:00
if exist file then read lines err
This commit is contained in:
parent
d99ae3e3a2
commit
23ff422826
4
log.go
4
log.go
@ -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"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user