eslym / laravel-discord-webhook-log
A Discord webhook handler for monolog in laravel
1.1.0
2022-03-05 01:53 UTC
Requires
- php: >=7.1.3
- guzzlehttp/guzzle: ^6.0|^7.0
- illuminate/support: >=5.8 <10
- monolog/monolog: ^1.12|^2.0
- symfony/var-dumper: >=4.2
Requires (Dev)
- orchestra/testbench: >=3.8
- phpunit/phpunit: ^7.5 || ^8.0
README
<?php # config/logging.php return [ // ... 'channels' => [ // ... 'discord' => [ 'driver' => 'monolog', 'handler' => \Eslym\Laravel\Log\DiscordWebhook\DiscordWebhookHandler::class, 'with' => [ 'webhook' => env('DISCORD_LOG_WEBHOOK'), 'message' => env('DISCORD_LOG_MESSAGE'), ], 'formatter' => \Monolog\Formatter\LineFormatter::class, 'formatter_with' => [ 'format' => '%message% %context% %extra%', 'allowInlineLineBreaks' => true, 'ignoreEmptyContextAndExtra' => true, ], ], // ... ], // ... ]
# .env DISCORD_LOG_WEBHOOK="webhook url" DISCORD_LOG_MESSAGE="Hey <@ (discord user id here) >! here is your log."