From 2e4c46a4fb02b9ca7516b4c9200b84f7be5be3be Mon Sep 17 00:00:00 2001 From: yuzhiqiang Date: Thu, 14 Aug 2025 09:21:30 +0800 Subject: [PATCH] feat(blobstore): add compress option to log configuration Since the lumberjack package has a compression option, this option is also added to the log configuration. The default value is false, and it is up to the user to decide whether to enable it. Signed-off-by: yuzhiqiang --- blobstore/cmd/cmd.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blobstore/cmd/cmd.go b/blobstore/cmd/cmd.go index 8b2d68e86..8a19decb3 100644 --- a/blobstore/cmd/cmd.go +++ b/blobstore/cmd/cmd.go @@ -51,6 +51,7 @@ type LogConfig struct { MaxSize int `json:"maxsize"` MaxAge int `json:"maxage"` MaxBackups int `json:"maxbackups"` + Compress bool `json:"compress"` } type Config struct { @@ -105,6 +106,7 @@ func NewLogWriter(cfg *LogConfig) io.Writer { MaxAge: maxage, MaxBackups: maxbackups, LocalTime: true, + Compress: cfg.Compress, } }