From 2bd6d335373ec7d4e1d2971ba2f3f17ad59a1e5c Mon Sep 17 00:00:00 2001 From: JellyTony Date: Mon, 11 Mar 2024 23:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20go.mod=20=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E4=BE=9D=E8=B5=96=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lumberjack.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lumberjack.go b/lumberjack.go index 7e1167b..691fd06 100644 --- a/lumberjack.go +++ b/lumberjack.go @@ -27,7 +27,7 @@ import ( "fmt" "io" "io/ioutil" - "log/slog" + "log" "os" "path/filepath" "sort" @@ -226,7 +226,7 @@ func (l *RollingFile) close() error { } err := l.file.Sync() if err != nil { - slog.Error("sync file error: ", err) + log.Fatalln("sync file error: ", err) } err = l.file.Close() l.file = nil