Browse Source

Merge branch 'feature/change_log' into debug

xyxie 1 năm trước cách đây
mục cha
commit
b21a7f8fe8
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      utils/logs.go

+ 5 - 5
utils/logs.go

@@ -14,7 +14,7 @@ import (
 const (
 	DefaultLogPath    = "./rdlucklog/filelog"
 	DefaultBinlogPath = "./rdlucklog/binlog"
-	DefaultDataPath   = "./rdlucklog/filedata"
+	DefaultDataPath   = "./rdlucklog/datalog"
 	DefaultApiLogPath = "./rdlucklog/apilog"
 )
 
@@ -30,7 +30,7 @@ func init() {
 	}
 	logFile := LogFile
 	if logFile == "" {
-		logFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDate))
+		logFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDateUnSpace))
 	}
 	os.MkdirAll(logPath, os.ModePerm)
 
@@ -79,7 +79,7 @@ func initBinlog() {
 	}
 	binlogFile := BinLogFile
 	if binlogFile == "" {
-		binlogFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDate))
+		binlogFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDateUnSpace))
 	}
 	os.MkdirAll(binlogPath, os.ModePerm)
 	logFileName := path.Join(binlogPath, binlogFile)
@@ -101,7 +101,7 @@ func initApiLog() {
 	}
 	logFile := ApiLogFile
 	if logFile == "" {
-		logFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDate))
+		logFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDateUnSpace))
 	}
 	os.MkdirAll(logPath, os.ModePerm)
 
@@ -125,7 +125,7 @@ func initFileLogData() {
 	}
 	logFile := LogDataFile
 	if logFile == "" {
-		logFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDate))
+		logFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDateUnSpace))
 	}
 	os.MkdirAll(logPath, os.ModePerm)