|
@@ -2,13 +2,11 @@ package utils
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
- "fmt"
|
|
|
"github.com/beego/beego/v2/core/logs"
|
|
|
"github.com/sirupsen/logrus"
|
|
|
"gopkg.in/natefinch/lumberjack.v2"
|
|
|
"os"
|
|
|
"path"
|
|
|
- "time"
|
|
|
)
|
|
|
|
|
|
const (
|
|
@@ -31,7 +29,7 @@ func init() {
|
|
|
}
|
|
|
logFile := LogFile
|
|
|
if logFile == "" {
|
|
|
- logFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDateUnSpace))
|
|
|
+ logFile = "filelog.log"
|
|
|
}
|
|
|
os.MkdirAll(logPath, os.ModePerm)
|
|
|
|
|
@@ -77,7 +75,7 @@ func initBinlog() {
|
|
|
}
|
|
|
binlogFile := BinLogFile
|
|
|
if binlogFile == "" {
|
|
|
- binlogFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDateUnSpace))
|
|
|
+ binlogFile = "binlog.log"
|
|
|
}
|
|
|
os.MkdirAll(binlogPath, os.ModePerm)
|
|
|
logFileName := path.Join(binlogPath, binlogFile)
|
|
@@ -99,7 +97,7 @@ func initApiLog() {
|
|
|
}
|
|
|
logFile := ApiLogFile
|
|
|
if logFile == "" {
|
|
|
- logFile = fmt.Sprintf("%s.log", time.Now().Format(FormatDateUnSpace))
|
|
|
+ logFile = "apilog.log"
|
|
|
}
|
|
|
os.MkdirAll(logPath, os.ModePerm)
|
|
|
|