nfacha/dicord-log-target

There is no license information available for the latest version (dev-master) of this package.

Discord WebHook Log Target for Yii2

dev-master 2020-05-15 09:09 UTC

This package is auto-updated.

Last update: 2025-04-16 06:42:24 UTC


README

Add the following to your application components:

'log'                  => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets'    => [
                [
                    'class'          => DiscordLogTarget::class,
                    'webhookUrl'     => 'https://discordapp.com/api/webhooks/<WebhookURL>>',
                    'levels'         => [ 'error' ],
                    'exportInterval' => 1,
                    'maskVars'       => [ '_SERVER', '_COOKIE' ],
                    'except'         => [
                        'yii\web\HttpException:404',
                        'yii\web\HttpException:400',
                        'yii\web\HttpException:403',
                        'yii\i18n\*',
                    ],
                ],
            ],