From d41bba79b6970be592b521f5d094d785cc18ff74 Mon Sep 17 00:00:00 2001 From: johlanse Date: Fri, 29 Jul 2022 16:02:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E6=97=A5=E5=BF=97=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0config=E5=AD=90=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=EF=BC=8C=E6=96=B9=E4=BE=BFdocker=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 2 +- web/controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 92af5d4..9ec5f81 100644 --- a/main.go +++ b/main.go @@ -40,7 +40,7 @@ func init() { TimestampFormat: "2006-01-02 15:04:05", LogFormat: "[%time%] [%lvl%]: %msg% \n", } - w, err := rotates.New(path.Join("logs", "%Y-%m-%d.log"), rotates.WithRotationTime(time.Hour*24)) + w, err := rotates.New(path.Join("config", "logs", "%Y-%m-%d.log"), rotates.WithRotationTime(time.Hour*24)) if err != nil { log.Errorf("rotates init err: %v", err) panic(err) diff --git a/web/controller.go b/web/controller.go index 6394926..729fe0e 100644 --- a/web/controller.go +++ b/web/controller.go @@ -271,7 +271,7 @@ func stopStudy() gin.HandlerFunc { func getLog() gin.HandlerFunc { return func(ctx *gin.Context) { - ctx.File(fmt.Sprintf("./logs/%v.log", time.Now().Format("2006-01-02"))) + ctx.File(fmt.Sprintf("./config/logs/%v.log", time.Now().Format("2006-01-02"))) } }