Skip to content

Log file rotation not working according to configurationΒ #20682

@mamadza

Description

@mamadza

I have configured the log rotation settings in my web.php file as follows:

'targets' => [
    [
        'class' => 'yii\log\FileTarget',
        'levels' => ['error', 'warning'],
        'except' => [
            'yii\web\HttpException:403',
            'yii\web\HttpException:404',
        ],
        'maxFileSize' => 200 * 1024, // 200MB
        'maxLogFiles' => 40,
    ],
],

However, it seems that Yii is still using the default log rotation settings.
The log file does not rotate based on the configuration above.

Expected behavior:
Log files should rotate when they reach the configured size (maxFileSize) and respect the defined number of files (maxLogFiles).

Yii Version: 2.0.53

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions