Reputation: 2365
I set up a separate logging for their own purposes
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
[
'class' => 'yii\log\FileTarget',
'levels' => ['info'],
'categories' => [
'mycat',
],
'logFile' => '@app/runtime/logs/mycat.log'
]
],
],
Then, a specific event is logged
Yii::info("It's work", 'mycat');
After that, I expect that in the file mycat.log will only "It's work", but this is still being written log category of "application":
tail -f runtime/logs/mycat.log
Question: How to disable log for application in mycat.log?
P.S. Sorry, for my english. Sorry, sorry :(
Upvotes: 3
Views: 4306