mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 16:57:08 +00:00
feat: reduce log file retention period and increase cache size
This commit is contained in:
parent
223f5b72d3
commit
ffe5d7d338
@ -36,7 +36,7 @@ func SetLogConf(level string) {
|
|||||||
Filename: log_file,
|
Filename: log_file,
|
||||||
MaxSize: 2, // megabytes
|
MaxSize: 2, // megabytes
|
||||||
MaxBackups: 3,
|
MaxBackups: 3,
|
||||||
MaxAge: 28, //days
|
MaxAge: 15, //days
|
||||||
LocalTime: true,
|
LocalTime: true,
|
||||||
Compress: true,
|
Compress: true,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,7 @@ func New(cfg *config.Config) (*Rewriter, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
cache := expirable.NewLRU[string, string](300, nil, 10*time.Minute)
|
cache := expirable.NewLRU[string, string](1024, nil, 10*time.Minute)
|
||||||
|
|
||||||
whitelist := make(map[string]struct{}, len(defaultWhitelist))
|
whitelist := make(map[string]struct{}, len(defaultWhitelist))
|
||||||
for _, s := range defaultWhitelist {
|
for _, s := range defaultWhitelist {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user