jeffersongoncalves/laravel-settings-discord-logger
A Laravel package that adds a Discord logging channel configured through Laravel Settings, making it easy to send application logs to Discord webhooks with minimal setup and runtime-configurable options.
This package is a thin configuration-bridge between two well-established dependencies: jeffersongoncalves/laravel-discord-logger (the logging channel) and spatie/laravel-settings (the persistence layer). As a TPM, the important read is that this package owns very little logic — its value is making Discord logging runtime-configurable from a database instead of .env + redeploy. That's a real operational win, but it also means the package inherits the risk profile of both upstreams plus a small, newly-written integration surface that has never run in production anywhere.
Architecture fit. The design is sound and idiomatic Laravel: a settings class (DiscordLoggerSettings), a custom channel factory that merges stored values over config/logging.php, and auto-registration of the discord channel. The "merge stored over config" pattern is the correct one — it preserves existing .env behaviour while allowing DB overrides, and the explicit fallbacks (empty webhook → LOG_DISCORD_WEBHOOK_URL, missing settings table → config) are exactly the defensive choices a TPM wants to see in a v1.0.0. Auto-upgrading a channel that used the plain Logger is convenient but is the one piece of implicit behaviour I'd flag: it mutates logging configuration by side effect.
Integration feasibility. Low effort on a greenfield Laravel 12/13 app: install, publish/run the settings migration, set the webhook via .env or the DB. Moderate effort on an existing app, because the migration is seeded from current config — that's helpful, but it means the rollout must be sequenced around the deploy (migration + config cache clear + first channel use), and the seeding behaviour needs verification in staging against your actual .env.
Technical risk.
Crypt. That is correct for secrets, but it couples the settings table to APP_KEY. Rotating APP_KEY bricks stored webhooks, and any key mismatch between environments (e.g. shared DB, staging copy) silently breaks logging. This is the single largest operational hazard in the release.Key questions for the maintainer/vendor:
APP_KEY, env mismatch)? Fail-open to config, fail-closed, or throw?Logger, and is it suppressible?Stack fit. Good fit if you are on Laravel 12.61+/13 and PHP 8.2+, already use spatie/laravel-settings, and already send logs to Discord. If you don't use spatie/laravel-settings, this package pulls in a second persistence abstraction purely for logging config — a meaningful architectural addition for a peripheral concern. If you're on Laravel 10/11, this is a non-starter today; do not plan around it.
Migration path. The seeded migration is the right call and materially reduces switching cost: existing .env-driven webhook setups should keep working because the empty-stored-webhook case falls back to LOG_DISCORD_WEBHOOK_URL. Recommended path for an existing installation:
LOG_DISCORD_WEBHOOK_URL or the discord channel config..env and confirm the seeded row matches the current config.discord-logger:test from staging and confirm it uses the stored webhook, not config.Compatibility. Two constraints to pin explicitly: the Laravel/PHP floor, and the spatie/laravel-settings major version. Also pin the logger package — the "upgrades a channel that used the plain Logger" behaviour is version-sensitive and worth a regression test on your side. Note APP_KEY as a compatibility dependency across environments, not just a config value.
Sequencing. Because the migration seeds from current config, order matters: deploy config (including LOG_DISCORD_WEBHOOK_URL) → run migration → clear config cache → verify channel resolution → then start editing settings at runtime. Doing the migration before the config is in place risks seeding an empty webhook, and a subsequent "edit settings" flow would then look like it works while silently falling back. Treat discord-logger:test as the acceptance gate for each environment.
Maintenance. Low code surface, but three maintenance obligations instead of one: this package, the logger, and spatie/laravel-settings. All version floors must move together. Budget for dependency-bump PRs on the upstream packages' cadence, not yours.
Support. Single maintainer on a 1.0.0 with no public adoption history is the primary support risk. Recommend an internal owner, a pinned version, and a documented fallback (revert to .env-only logger config) before this touches production alerting. Discord logging is often a secondary/incident channel — do not let it become the only path for critical alerts without a fallback.
Scaling. Runtime DB-backed settings are cheap and cached by the settings package, so read overhead is negligible; the real scale consideration is behavioural — rate limits, deduplication, queueing and grouping are now changeable at runtime by anyone with DB or admin-panel access. That's a feature and a governance gap: a bad dedup or rate-limit value can suppress incident noise silently. Require audit logging and change control on that table.
Failure modes to plan for:
APP_KEY rotation / cross-environment key mismatch → decryption failure on stored webhooks. Highest-likelihood incident. Mitigate by treating the settings webhook as re-enterable, documenting re-seeding after rotation, and testing decrypt failure explicitly.Logger channel silently becomes this channel. Verify on every Laravel minor upgrade.Ramp-up. Low for a Laravel-fluent engineer — a few hours to install, migrate, and validate, plus an hour or two of runbook writing. Moderate for the team overall, because the operational knowledge (encryption/APP_KEY coupling, seeded migration ordering, discord-logger:test gate) is non-obvious and must be written down rather than assumed. Recommend: a short spike on a non-critical channel, a runbook covering key rotation and rollback, and a review checkpoint before promoting to production alerting. Overall: adopt-with-conditions — technically clean and genuinely useful for runtime control of Discord logging, but held back by an aggressive Laravel version floor, APP_KEY coupling, and single-maintainer v1.0.0 risk.
How can I help you explore Laravel packages today?