mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
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:
parent
2f8f2f92a7
commit
2e4c46a4fb
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user