Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Discord Logger

Laravel Discord Logger Laravel Package

marvinlabs/laravel-discord-logger

Laravel Discord Logger adds a Discord logging channel to Laravel, sending application logs to Discord webhooks with configurable formatting, levels, and mention support. Useful for real-time alerts and monitoring without extra infrastructure.

View on GitHub
Deep Wiki
Context7

Logging to a discord channel in Laravel

Frequently asked questions about Laravel Discord Logger
How do I install and configure laravel-discord-logger?
Install it with Composer using marvinlabs/laravel-discord-logger, then publish the package configuration. Add a discord channel in config/logging.php with your Discord webhook URL and attach that channel to a stack or use it directly. The package plugs into Laravel's existing logging configuration, so no migrations or queue workers are required.
Which Laravel and PHP versions does laravel-discord-logger support?
The package targets PHP 8.x and Monolog 2 or 3, and version 1.4.4 explicitly adds Laravel 13 support, which suggests the maintainer tracks current Laravel majors. Before installing, confirm the exact Composer constraints against your application's Laravel and Monolog versions. If you are on an older Laravel release, check the package tags rather than assuming the latest version will resolve.
Does Laravel Discord Logger block the request thread, or can it send logs asynchronously?
It is a Monolog handler, so by default log delivery is synchronous and webhook latency sits in the request path whenever a record is emitted. You can wrap it in Laravel's queued logging if you need asynchronous delivery, but verify that setup in your application. For error-level logs, assume Discord availability can affect response time unless you explicitly queue the channel.
How does laravel-discord-logger handle Discord rate limits, failures, and long messages?
Discord webhooks are rate-limited per webhook, and messages are capped at roughly 2,000 characters with embeds around 6,000, so formatting choices affect truncation. The handler is designed to fail gracefully, meaning a Discord outage or rate-limit response should not throw application errors, but that also means records can be dropped silently. Keep a file or stream channel in your logging stack and test how long messages are truncated before relying on Discord for alerts.
Can I route only specific log levels to Discord alongside my existing channels?
Yes. Because it is a standard Laravel logging channel, you set its level in config/logging.php and use stack fan-out to send only selected levels to Discord while other channels keep full records. A common setup is a dedicated errors channel for uncaught exceptions and a separate stack entry for warnings or critical alerts. This keeps Discord as a notification surface rather than your primary log store.
Does Laravel Discord Logger support @everyone and role mentions?
The package supports mention configuration as part of its Discord formatting options, including broad mentions such as @everyone or specific roles. Treat mentions as a notification-amplification risk and restrict them to a known allowlist instead of enabling them globally. Also check who can trigger the log path, since user-controlled data rendered into messages can influence alert noise.
Is it safe to send production logs that may contain PII or secrets to Discord?
Discord is a third-party service, so anything included in your log context can leave your infrastructure. Review what your exception handler and log calls include, redact secrets and personal data, and confirm this against your data residency and vendor-approval policy before enabling it in production. The package does not replace the need for a data-handling review of your log payloads.
How do I test the Discord logger without spamming a real channel?
Point the channel at a dedicated test webhook and keep it out of production stacks while you verify formatting, levels, and failure behavior. You can also restrict the channel to local or staging environments and use fake HTTP responses in tests so a failing webhook never affects the application. Confirm that a bad webhook URL produces failed deliveries rather than application errors.
Is laravel-discord-logger actively maintained and production-ready?
The package is small, around 212 GitHub stars, and effectively single-maintainer, so treat it as a pinned dependency rather than a heavily supported platform component. Its architecture is low risk because it is only a Monolog handler, but a bus factor of one means patching a few hundred lines in-house is a plausible contingency. Pin the version you validate and review release notes before upgrading Laravel majors.
When should I avoid using Discord as a Laravel log destination?
Skip it when you need durable, queryable retention or centralized log search, because Discord is a notification surface rather than a log store. It is also a poor fit if you already run Datadog, Splunk, or CloudWatch and only need alerting those tools already provide. Use it as an additive real-time alert channel, not as a replacement for your existing logging pipeline.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core