From 6f87cda07f1e17cc4c04125efc4af4ccff6a1166 Mon Sep 17 00:00:00 2001 From: boyce <6549168@qq.com> Date: Mon, 2 Feb 2026 15:02:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=BB=9A=E5=8A=A8=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 2 +- go.sum | 4 ++-- log/log.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index fe5f921..ae28f54 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.22.7 require ( github.com/IBM/sarama v1.43.3 - github.com/duanhf2012/rotatelogs v0.0.0-20251218013258-dba78b7ce77a + github.com/duanhf2012/rotatelogs v0.0.0-20260202065658-f38ef69c6a39 github.com/gin-gonic/gin v1.10.0 github.com/go-sql-driver/mysql v1.6.0 github.com/goccy/go-json v0.10.2 diff --git a/go.sum b/go.sum index 7d5e809..5d683cb 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,8 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/duanhf2012/rotatelogs v0.0.0-20251218013258-dba78b7ce77a h1:JCaWgoCqcl7FvO6kIWrT8pW/TeOh0q7bRmODzhNG8C8= -github.com/duanhf2012/rotatelogs v0.0.0-20251218013258-dba78b7ce77a/go.mod h1:S/NNkpdnXps6VXaYVVDFtqQAm/NKayHxxOAhsrFnCgg= +github.com/duanhf2012/rotatelogs v0.0.0-20260202065658-f38ef69c6a39 h1:T+lS1jdEUNgkx3gG6MrO4rgkf8jGJNHSfRLKsLz31MM= +github.com/duanhf2012/rotatelogs v0.0.0-20260202065658-f38ef69c6a39/go.mod h1:S/NNkpdnXps6VXaYVVDFtqQAm/NKayHxxOAhsrFnCgg= github.com/eapache/go-resiliency v1.7.0 h1:n3NRTnBn5N0Cbi/IeOHuQn9s2UwVUH7Ga0ZWcP+9JTA= github.com/eapache/go-resiliency v1.7.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= diff --git a/log/log.go b/log/log.go index b5de1fa..b0907ce 100644 --- a/log/log.go +++ b/log/log.go @@ -142,7 +142,7 @@ func (logger *Logger) NewRotatelogsWriter() zapcore.WriteSyncer { options = append(options, rotatelogs.WithRotationTime(time.Hour*24)) fileName := strings.TrimRight(logger.FileName, filepath.Ext(logger.FileName)) - rotateLogs, err := rotatelogs.NewRotateLogs(LogPath, "20060102/"+fileName,"_20060102_150405", options...) + rotateLogs, err := rotatelogs.NewRotateLogs(LogPath, fileName,"20060102","_20060102_150405", options...) if err != nil { panic(err) }