PHP code example of saviorlv / yii2-dingtalk-exception

1. Go to this page and download the library: Download saviorlv/yii2-dingtalk-exception library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

saviorlv / yii2-dingtalk-exception example snippets

bash
'components' => [
    ......
    'log' => [
                'traceLevel' => YII_DEBUG ? 3 : 0,
                'targets' => [
                    [
                        'class' => 'yii\log\FileTarget',
                        'levels' => ['error', 'warning'],
                    ],
                    [
                        'class' => 'Saviorlv\Log\ExceptionTarget',
                        'levels' => ['error', 'warning'],
                        'options' => [
                            'accessToken' => 'xxxxxxxx',
                            'isAtAll' => false,
                            'atMobiles' => ['136xxxx5134']
                        ],
                    ],
                ],
            ],
    ......
]