Hi guys,
I would like to log my own log messages in a seperate file. I’ve read that I can make something with categories, but I couldn’t get it. My log config:
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'flushInterval' => 1,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['info', 'error', 'warning'],
'exportInterval' => 1,
'logFile' => '@app/runtime/logs/trace.log',
],
],
],
Then if I write
\Yii::info('This is some test..');
the the info-log entry is visible in my trace.log file. But is there any possibility for a "custom.log" file only for own log entries?
Thanks