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 <yuzhiqiang_yewu@cmss.chinamobile.com>
This commit is contained in:
yuzhiqiang 2025-08-14 09:21:30 +08:00 committed by 梁曟風
parent 2f8f2f92a7
commit 2e4c46a4fb

View File

@ -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,
}
}