Skip to main content
View, clean, and manage log files on Lagerboxes.

Syntax

Commands


Command Reference

size

Check log file sizes on one or all Lager Boxes.
Options:
  • --box BOX - Specific Lager Box (if not specified, checks all)
  • --verbose / -v - Show individual log files
Examples:
Output:

clean

Remove old log files from a Lager Box.
Options:
  • --box BOX (required) - Lager Box to clean
  • --older-than DAYS - Remove logs older than N days (default: 1)
  • --yes - Skip confirmation prompt
Examples:
Output:

docker

Check Docker container log sizes.
Options:
  • --box BOX (required) - Lager Box to check
  • --container NAME - Specific container (default: all)
Examples:
Output:

Log Rotation

Docker containers use automatic log rotation:
  • Maximum size: 10 MB per file
  • Maximum files: 3 (rotates oldest)
This means Docker logs are self-managing and shouldn’t grow unbounded.

Size Thresholds

The size command uses warning thresholds:

What Gets Cleaned

The clean command removes:
  • System logs in /var/log/
  • Lager application logs
  • Old rotated log files (.log.1, .log.gz, etc.)
It does not remove:
  • Current log files
  • Docker container logs (managed separately)
  • Files newer than --older-than threshold

Automation

Schedule regular log cleaning:

Examples


Notes

  • Log cleaning requires SSH access to the Lager Box
  • Docker logs are automatically rotated
  • Use --verbose to identify large log files
  • Regular cleaning prevents disk space issues