We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if w.MaxLines > 0 || w.MaxSize > 0 { for ; err == nil && num <= 999; num++ { fName = w.fileNameOnly + fmt.Sprintf(".%s.%03d%s", logTime.Format("2006-01-02"), num, w.suffix)//这块用的Logtime 是新一天的日期 应该用dailyOpenTime? _, err = os.Lstat(fName) } } else { fName = fmt.Sprintf("%s.%s%s", w.fileNameOnly, w.dailyOpenTime.Format("2006-01-02"), w.suffix) _, err = os.Lstat(fName) for ; err == nil && num <= 999; num++ { fName = w.fileNameOnly + fmt.Sprintf(".%s.%03d%s", w.dailyOpenTime.Format("2006-01-02"), num, w.suffix) _, err = os.Lstat(fName) } }
The text was updated successfully, but these errors were encountered:
file { filename = "log/gate.log" daily = true rotate = true level = 3 max-lines = 0 max-size = 104857600 }
daily 和 max-size都开启,当到新一天的时候,比如2016-07-02,重命名07-01的旧日志用的新日期,把上面代码的logTime改为dailyOpenTime是否能解决?
Sorry, something went wrong.
请见 #17 这个是从beego移植过来的,但beego的作者一直未更新
No branches or pull requests
The text was updated successfully, but these errors were encountered: