1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-06 06:20:19 +00:00

some typo fixed

This commit is contained in:
JessonChan
2016-01-26 09:29:04 +08:00
parent b5a07c6ba8
commit f2567bc114
2 changed files with 13 additions and 16 deletions

View File

@ -118,19 +118,16 @@ func (w *fileLogWriter) WriteMsg(when time.Time, msg string, level int) error {
if level > w.Level {
return nil
}
//2016/01/12 21:34:33
// now := time.Now()
d := when.Day()
msg = formatLogTime(when) + msg + "\n"
if w.Rotate {
d := when.Day()
if w.needRotate(len(msg), d) {
w.Lock()
if w.needRotate(len(msg), d) {
if err := w.doRotate(when); err != nil {
fmt.Fprintf(os.Stderr, "FileLogWriter(%q): %s\n", w.Filename, err)
}
}
w.Unlock()
}