Macareux Logs Cleaner

  • thumbnail.png
  • Screen-1.png
  • Screen-2.png
  • Screen-3.png

Efficiently clear and manage Concrete CMS logs via CLI with advanced filtering by channel, date, and log level. Includes backup, dry-run preview, and batch processing.

Macareux Logs Cleaner is a powerful command-line tool for maintaining and managing your Concrete CMS log database. Over time, system logs can accumulate and consume significant database storage, impacting site performance. This package provides a safe, efficient, and flexible way to clean up old or unnecessary log entries while maintaining full control over what gets deleted.

Key Features

Flexible Filtering: Target specific logs by channel, log level (debug, info, warning, error, etc.), or age

Dry-Run Mode: Preview exactly which logs will be deleted before committing to the operation

Safety First: Interactive confirmation prompt prevents accidental deletions (can be bypassed with --force flag)

Backup Support: Create CSV backups of logs before deletion for audit trails and compliance

Batch Processing: Efficiently handles large log volumes with optimized batch processing

Multiple Log Levels: Delete logs from multiple levels in a single command (comma-separated)

Time-Based Cleanup: Automatically remove logs older than a specified number of days

Progress Tracking: Real-time progress bar shows deletion status and performance metrics

Enhanced Output: Color-coded console messages for better visibility and user experience

Error Handling: Comprehensive error handling with meaningful error messages

Automation Ready: Perfect for cron jobs and automated maintenance scripts

Use Cases

  • Development Environments: Clear debug and info logs accumulated during development
  • Production Maintenance: Implement automated log retention policies
  • Storage Management: Free up database space by removing old log entries
  • Compliance: Create backups before deletion for audit requirements
  • Performance Optimization: Keep log tables lean for faster queries
  • Troubleshooting: Clean up logs after resolving issues to reduce noise

Why Use This Package?

Without proper log management, Concrete CMS installations can accumulate thousands or even millions of log entries over time. Manual deletion through the dashboard is impractical for large datasets. This package provides:

  • Speed: Process thousands of log entries in seconds with batch operations
  • Control: Granular filtering ensures you only delete what you intend to
  • Safety: Multiple safeguards prevent data loss from accidental deletions
  • Flexibility: Works perfectly in both interactive terminals and automated scripts
  • Compatibility: Supports both Concrete CMS v8 and v9+ with version detection

Perfect For

  • Site administrators managing production environments
  • Developers maintaining development/staging servers
  • DevOps teams implementing automated maintenance routines
  • Agencies managing multiple Concrete CMS installations
  • Anyone concerned about database performance and storage

Technical Highlights

  • Written following Concrete CMS best practices
  • Zero dependencies beyond Concrete CMS core
  • Minimal resource usage with memory-efficient batch processing
  • Compatible with all storage location configurations
  • Fully namespaced and PSR-4 autoloading compliant