Answer the question
In order to leave comments, you need to log in
How to disable debug log in Yii2?
You can't turn debug off completely, i.e. the mode remains "dev" - you should see the errors.
But the /runtime/debug folder quickly becomes heavy.
You need to disable logging to a file, but where and how?
Now there is just a symlink to /dev/null, but this is a hack, of course.
Answer the question
In order to leave comments, you need to log in
We read the documentation:
You can enable or disable a log target by configuring its enabled property. You may do so via the log target configuration or by the following PHP statement in your code:
Or add directly to the config:
'targets' => [
'file' => [
'class' => 'yii\log\FileTarget',
'enabled' => false
],
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question