Monthly Log Rotation with Laravel 13.23

Punyapal Shah
Laravel 13.23 adds a built-in monthly logging driver that rotates log files once per month instead of daily.

Daily log rotation creates hundreds of log files over time. If your application has moderate log volume, the monthly driver keeps logs organized into one file per month (e.g. laravel-2026-08.log).

// config/logging.php
'channels' => [
    'monthly' => [
        'driver' => 'monthly',
        'path'   => storage_path('logs/laravel.log'),
        'days'   => 12, // Retain 12 months of logs
    ],
],
  • One log file per month (e.g. laravel-2026-08.log)
  • days parameter controls how many months of logs to retain
  • Ideal for production apps with moderate log volume
Tags: #Laravel #Logging #Configuration
Share on X

// Found an issue or want to contribute a tip? github.com/MrPunyapal/tips