mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 22:10:55 +00:00
Merge pull request #2920 from chenpeiyuan/develop
avoid unnecessary read of large log file
This commit is contained in:
commit
3b829504f6
@ -182,7 +182,7 @@ func (w *fileLogWriter) initFd() error {
|
|||||||
if w.Daily {
|
if w.Daily {
|
||||||
go w.dailyRotate(w.dailyOpenTime)
|
go w.dailyRotate(w.dailyOpenTime)
|
||||||
}
|
}
|
||||||
if fInfo.Size() > 0 {
|
if fInfo.Size() > 0 && w.MaxLines > 0 {
|
||||||
count, err := w.lines()
|
count, err := w.lines()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user