nolint:gocritic
(ec zaplogutil.StdConsoleEncoderConfig, jc zapcore.EncoderConfig, isJSON bool)
| 282 | |
| 283 | //nolint:gocritic |
| 284 | func (c *loggingFlags) jsonOrConsoleEncoder(ec zaplogutil.StdConsoleEncoderConfig, jc zapcore.EncoderConfig, isJSON bool) zapcore.Encoder { |
| 285 | if isJSON { |
| 286 | return zapcore.NewJSONEncoder(jc) |
| 287 | } |
| 288 | |
| 289 | return zaplogutil.NewStdConsoleEncoder(ec) |
| 290 | } |
| 291 | |
| 292 | func shouldSweepLog(maxFiles int, maxAge time.Duration) bool { |
| 293 | return maxFiles > 0 || maxAge > 0 |
no test coverage detected