Skip to content

Add built-in log rotation with sensible defaults #5

@geekforbrains

Description

@geekforbrains

Problem

Operator appends all logs to a single file (~/.operator/logs/operator.log) with no rotation. On a moderately active install (4 agents, 6 jobs), this grows ~1.4MB/day. Over time the log becomes unwieldy and wastes disk.

Proposal

Add built-in log rotation to the Operator runtime with a config option:

logging:
  max_size: "10MB"       # rotate when file exceeds this size
  max_files: 7           # keep N rotated files
  compress: true         # gzip old files

Sensible defaults so it works out of the box without config. Python's logging.handlers.RotatingFileHandler would handle this natively.

Current workaround

External logrotate config or manual truncation in a cron/backup script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions