From 4de55dcbb80cfcf5494f1924b236a12aad124d0d Mon Sep 17 00:00:00 2001 From: Mmx233 Date: Mon, 15 Aug 2022 23:49:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A0=E6=B3=95=E5=86=99=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=96=87=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global/log.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/global/log.go b/global/log.go index ea723b5..4a31754 100644 --- a/global/log.go +++ b/global/log.go @@ -5,6 +5,7 @@ import ( "io" "os" "strings" + "time" ) func initLog() { @@ -21,7 +22,7 @@ func initLog() { log.Fatalln(e) } - f, e := os.OpenFile(Config.Settings.Debug.LogPath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 700) + f, e := os.OpenFile(Config.Settings.Debug.LogPath+time.Now().Format("2006.01.02-15.04.05")+".log", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 700) if e != nil { log.Fatalln(e) }