Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, Laravel allows you to set the logging files to daily intervals. You can configure this in the "logging.php" configuration file by setting the "daily" option in the "channels" array. Here's an example:

'channels' => [
    'single' => [
        'driver' => 'single',
        'path' => storage_path('logs/laravel.log'),
        'level' => 'debug',
    ],

    'daily' => [
        'driver' => 'daily',
        'path' => storage_path('logs/laravel.log'),
        'level' => 'debug',
        'days' => 7,
    ],
],

In this example, we have two channels defined: "single" and "daily". The "single" channel writes to a single log file, while the "daily" channel writes to a new log file each day. The "days" option tells Laravel to keep logs for the specified number of days before deleting them.