From 4740c51383f4d64c33fe424f90ad1f00ca22928a Mon Sep 17 00:00:00 2001 From: donnie Date: Sun, 27 Aug 2017 13:04:43 +0800 Subject: [PATCH] fix --- logger/logw.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/logger/logw.go b/logger/logw.go index 65ee2f9..1d8037a 100644 --- a/logger/logw.go +++ b/logger/logw.go @@ -345,6 +345,8 @@ func (this *fileBean) rename(rolltype _ROLLTYPE) { os.Remove(nextfilename) } os.Rename(this.dir+"/"+this.filename, nextfilename) + t, _ := time.Parse(_DATEFORMAT, time.Now().Format(_DATEFORMAT)) + this._date = &t this.logfile, _ = os.OpenFile(this.dir+"/"+this.filename, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0666) this.lg = log.New(this.logfile, "", log.Ldate|log.Ltime|log.Lshortfile) this.filesize = fileSize(this.dir + "/" + this.filename)