haruatari / yii2-discord-log-target
Installs: 279
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.0
- yiisoft/yii2: ~2.0
- yiisoft/yii2-httpclient: *
This package is auto-updated.
Last update: 2024-10-16 21:12:33 UTC
README
It sends log messages to your discord channel via webhook.
Installation
Install via Composer:
composer require haruatari/yii2-discord-log-target
or add
"haruatari/yii2-discord-log-target" : "~1.0"
to the require
section of your composer.json
file.
Usage
Ad it into your Yii2 config file:
// ... 'components' => [ 'log' => [ 'targets' => [ [ '__class' => \haruatari\yii2\discordLogTarget\DiscordTarget::class, 'webhookUrl' => "your webhook's url", 'messageTitle' => 'App name', // Application ID will be used if not specified 'avatarUrl' => 'https://your-avatar-image-url', // The image will be used as discord webhook avatar if specified ], ], ], ] // ...
You also can use standard target parameters like categories
, levels
etc.