Answer the question
In order to leave comments, you need to log in
How to limit log size?
Hello.
How to reset/restart logging to a log when a certain file size (can be lines) that is stored in the runtime/logs folder is reached in YII2?
Answer the question
In order to leave comments, you need to log in
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'categories' => ['yii\web\HttpException:404'],
'logFile' => '@app/runtime/logs/404.log',
'levels' => ['error', 'warning'],
'maxFileSize' => 1024 * 4,
'maxLogFiles' => 5,
]
],
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question