Skip to content

BetsuNo/yii2-log-discord-target

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Discord log target for Yii2

This is the PHP Yii2 plugin for sending log of a yii application through the Discord WebHook API.

Important

You should avoid to use this target on a frequent events because of restriction in 30 messages per 60 seconds for the web-hooks.

Installation

Execute following command in shell:

composer require betsuno/yii2-log-discord-target

Or add following in your composer.json require section, and run composer install in your shell

"betsuno/yii2-log-discord-target": "*"

Configuration and usage

Add something as following in your yii config into the components section

'log' => [
    'class'     => '\betsuno\yii\log\DiscordTarget',
    'url'       => 'WEBHOOK_URL',                 // Your WebHook URL
    //'pattern' => "{category}: {level}\n{text}", // Optionally you can override default message pattern
]

More info about log targets may be found here

About

Discord log target for Yii2

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages