Yii2 - How can I remove unnecessary information from log file?
问题 I am trying to log messages in Yii2 which are then emailed to my specified email address. config file web.php contains: 'mail' => [ 'class' => 'yii\log\EmailTarget', 'categories' => ['mail'], 'logVars' => [], 'mailer' => 'mailer', 'message' => [ 'from' => ['user@example.com'], 'to' => ['user1@example.com'], 'subject' => 'Log message', ], ], I am logging message like this: Yii::info('Log message example','mail'); After successful execution, I am receiving mail like this: 2018-07-31 09:01:12