1
0
镜像自地址 https://github.com/astaxie/beego.git 已同步 2025-07-17 18:52:16 +00:00

Merge pull request #2920 from chenpeiyuan/develop

avoid unnecessary read of large log file
这个提交包含在:
astaxie
2017-11-07 09:35:09 -06:00
提交者 GitHub
当前提交 3b829504f6

查看文件

@@ -182,7 +182,7 @@ func (w *fileLogWriter) initFd() error {
if w.Daily {
go w.dailyRotate(w.dailyOpenTime)
}
if fInfo.Size() > 0 {
if fInfo.Size() > 0 && w.MaxLines > 0 {
count, err := w.lines()
if err != nil {
return err