dyanakiev/laravel-logger-discord-channel
Laravel Logger - Discord Channel
A Discord based Monolog driver for Laravel
Install
composer require dyanakiev/laravel-logger-discord-channel
Usage
- Add the new discord channel type in your
config/logging.phpconfiguration file, find the channels section and add the discord array within
'channels' => [
'discord' => [
'driver' => 'custom',
'via' => dyanakiev\LoggerDiscordChannel\DiscordLogger::class,
'suffix' => env('DISCORD_LOG_SUFFIX','Laravel Log'), // Message title suffix
'webhook' => env('DISCORD_LOG_WEBHOOK', false), // e.g. https://discordapp.com/api/webhooks/...
'level' => env('DISCORD_LOG_LEVEL', 'debug'), // You can choose from: emergency, alert, critical, error, warning, notice, info and debug
'context' => env('DISCORD_LOG_CONTEXT', false), // Enable this if you want to receive the full context of an error, usually useless
'environment' => env('DISCORD_LOG_ENVIRONMENT', 'production'), // Enable logging only for environment ['production', 'staging', 'local']
'message' => env('DISCORD_LOG_MESSAGE', false), // Here you can put extra message or tag role or person via @personName
],
],
- Add the new discord channel inside the
stackchannel, its recommended to setLOG_CHANNELtostackso you can still have your daily logs when running in production - Customize the package settings either directly in the config or in the .env file
Note
You may need to clear cache after installation if you get laravel.EMERGENCY: Unable to create configured logger. ... Log [discord] is not defined. with
php artisan config:clear
Dont forget to cache the config again after clearing cache if ran on production :)
php artisan config:cache
Example logs

Related Packages
guanguans/laravel-exception-notify
Monitor exception and report to the notification channels(Log、Mail、AnPush、Bar...
48,882
149
anpush
bark
bot
chanify
dingtalk
discord
email
error
exception
gitter
googlechat
igot
laravel
lark
log
logger
mail
mattermost
microsoftteams
monitor
notification
notifier
notify
nowpush
ntfy
push
pushback
pushbullet
pushdeer
pushme
pushover
pushplus
qq
qq 频道机器人
rocketchat
sdk
serverchan
server酱
showdocpush
simplepush
slack
telegram
wework
wpush
xizhi
yifengchuanhua
zohocliq
zohocliqwebhook
zulip
一封传话
企业微信
企业微信群机器人
微信
息知
钉钉
钉钉群机器人
飞书
飞书群机器人