fix: remove redundant binding tags and clarify logger compress logic
- Remove binding:"required" from model fields that are manually validated in handlers. - Add parentheses to logger compress default to clarify operator precedence. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -47,7 +47,7 @@ func NewLogger(cfg config.LogConfig) (*zap.Logger, error) {
|
||||
maxSize := applyDefaultInt(cfg.MaxSize, 100)
|
||||
maxBackups := applyDefaultInt(cfg.MaxBackups, 5)
|
||||
maxAge := applyDefaultInt(cfg.MaxAge, 30)
|
||||
compress := cfg.Compress || cfg.MaxSize == 0 && cfg.MaxBackups == 0 && cfg.MaxAge == 0
|
||||
compress := cfg.Compress || (cfg.MaxSize == 0 && cfg.MaxBackups == 0 && cfg.MaxAge == 0)
|
||||
|
||||
lj := &lumberjack.Logger{
|
||||
Filename: cfg.FilePath,
|
||||
|
||||
Reference in New Issue
Block a user