|
@@ -4,6 +4,7 @@ import (
|
|
|
//"github.com/beego/beego/v2/adapter/logs"
|
|
|
"github.com/beego/beego/v2/core/logs"
|
|
|
"os"
|
|
|
+ "time"
|
|
|
)
|
|
|
|
|
|
var FileLog *logs.BeeLogger
|
|
@@ -16,5 +17,5 @@ func init() {
|
|
|
binLogDir := `./binlog`
|
|
|
os.MkdirAll(binLogDir, os.ModePerm)
|
|
|
BinLog = logs.NewLogger(1000000)
|
|
|
- BinLog.SetLogger(logs.AdapterMultiFile, `{"filename":"./binlog/binlog.log","maxdays":30}`)
|
|
|
+ BinLog.SetLogger(logs.AdapterMultiFile, `{"filename":"./binlog/binlog.`+time.Now().Format(FormatDate)+`.log","maxdays":30}`)
|
|
|
}
|