(svc appServices, parent commandParent)
| 18 | } |
| 19 | |
| 20 | func (c *commandLogsCleanup) setup(svc appServices, parent commandParent) { |
| 21 | cmd := parent.Command("cleanup", "Clean up logs") |
| 22 | |
| 23 | cmd.Flag("max-age", "Maximal age").Default("720h").DurationVar(&c.maxAge) |
| 24 | cmd.Flag("max-count", "Maximal number of files to keep").Default("10000").IntVar(&c.maxCount) |
| 25 | cmd.Flag("max-total-size-mb", "Maximal total size in MiB").Default("1024").Int64Var(&c.maxTotalSizeMB) |
| 26 | cmd.Flag("dry-run", "Do not delete").BoolVar(&c.dryRun) |
| 27 | |
| 28 | cmd.Action(svc.directRepositoryWriteAction(c.run)) |
| 29 | } |
| 30 | |
| 31 | func (c *commandLogsCleanup) run(ctx context.Context, rep repo.DirectRepositoryWriter) error { |
| 32 | rep.LogManager().Disable() |
nothing calls this directly
no test coverage detected