simonefalcini/slacktarget

1.4.17 2023-03-16 09:25 UTC

This package is auto-updated.

Last update: 2024-04-16 11:55:12 UTC


README

Edit logs like this:

'log' => [
    'traceLevel' => YII_DEBUG ? 3 : 0,
    'targets' => [
        [
            'enabled' => !YII_DEBUG,
            'class' => '\simonefalcini\SlackTarget\SlackTarget',
            'channel' => '#channelname',
            'username' => 'Message Sender Name',
            'async' => true,
            'hook' => 'https://hooks.slack.com/services/HOOKPATH',
            'logVars' => [],
            'levels' => ['error', 'warning'],
            'except' => [
                'yii\web\HttpException:404',
                'yii\web\HttpException:400',
                'yii\web\BadRequestHttpException:400',
            ],
        ],
        [
            'class' => 'yii\log\FileTarget',
            'levels' => ['error', 'warning'],
        ],
    ],
],