From 4907b08c41594058e099b5e3d87ca426d296e1b1 Mon Sep 17 00:00:00 2001
From: chenshijun <csj_sky@126.com>
Date: 星期六, 28 九月 2019 19:30:28 +0800
Subject: [PATCH] 临时文件拷贝

---
 logger.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/logger.go b/logger.go
index 80d8f88..77109db 100644
--- a/logger.go
+++ b/logger.go
@@ -54,7 +54,7 @@
 var logFile LogFile
 
 func init()  {
-	logFile.logTime = time.Now().Unix()
+	//logFile.logTime = time.Now().Unix()
 	logFile.saveMode = ByDay	// 榛樿鎸夊ぉ淇濆瓨
 	logFile.saveDays = 15		// 榛樿淇濆瓨涓夊ぉ鐨�
 	logFile.level = ErrorLevel
@@ -196,6 +196,9 @@
 	if err := os.Rename(me.fileName, filename); err == nil {
 		go func() {
 			filenameTemp := filename + "Temp"
+			rmCpCmd := exec.Command("cp",  filename, filenameTemp)
+			rmCpCmd.Run()
+
 			tarCmd := exec.Command("tar", "-zcf", filename + ".tar.gz", filenameTemp, "--remove-files")
 			tarCmd.Run()
 

--
Gitblit v1.8.0