This commit is contained in:
icey-yu
2024-07-04 19:58:41 +08:00
committed by GitHub
parent f231ea1f21
commit cc2f993eab
5 changed files with 31 additions and 26 deletions
+4 -1
View File
@@ -136,8 +136,11 @@ func (r *RootCmd) initializeLogger(cmdOpts *CmdOpts) error {
r.log.IsStdout,
r.log.IsJson,
r.log.StorageLocation,
r.log.RemainRotationCount,
r.log.RotationTime,
r.log.MaxBackups,
r.log.MaxSize,
r.log.MaxAge,
r.log.Compress,
config.Version,
)
if err != nil {
+12 -9
View File
@@ -41,13 +41,16 @@ type LocalCache struct {
}
type Log struct {
StorageLocation string `mapstructure:"storageLocation"`
RotationTime uint `mapstructure:"rotationTime"`
RemainRotationCount uint `mapstructure:"remainRotationCount"`
RemainLogLevel int `mapstructure:"remainLogLevel"`
IsStdout bool `mapstructure:"isStdout"`
IsJson bool `mapstructure:"isJson"`
WithStack bool `mapstructure:"withStack"`
StorageLocation string `mapstructure:"storageLocation"`
RotationTime uint `mapstructure:"rotationTime"`
RemainLogLevel int `mapstructure:"remainLogLevel"`
MaxSize int `mapstructure:"maxSize"`
MaxBackups int `mapstructure:"maxBackups"`
MaxAge int `mapstructure:"maxAge"`
Compress bool `mapstructure:"compress"`
IsStdout bool `mapstructure:"isStdout"`
IsJson bool `mapstructure:"isJson"`
WithStack bool `mapstructure:"withStack"`
}
type Minio struct {
@@ -339,8 +342,8 @@ type BeforeConfig struct {
}
type AfterConfig struct {
Enable bool `mapstructure:"enable"`
Timeout int `mapstructure:"timeout"`
Enable bool `mapstructure:"enable"`
Timeout int `mapstructure:"timeout"`
AttentionIds []string `mapstructure:"attentionIds"`
}