jixinyu 2016-01-19 12:24:54 2832次浏览 1条回复 0 0 0
[
    'components' => [
        'log' => [
            'targets' => [
                'file' => [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['trace', 'info'],
                    'categories' => ['yii\*'],
                ],
                'email' => [
                    'class' => 'yii\log\EmailTarget',
                    'levels' => ['error', 'warning'],
                    'message' => [
                        'to' => ['admin@example.com', 'developer@example.com'],
                        'subject' => '来自 example.com 的新日志消息',
                    ],
                ],
            ],
        ],
    ],
]
您需要登录后才可以回复。登录 | 立即注册