marekmiklusek/telegram-logger
marekmiklusek/telegram-logger adds a Laravel logging channel that sends application logs to Telegram chats via the Bot API. Configure the bot token, chat ID, and minimum log level to receive real-time error alerts and monitor events directly in Telegram.
❌ ERROR | Shop | production) makes one Telegram chat legible across several applications and environments — a real enabler for agencies or platform teams running many small Laravel apps who want one shared feed instead of N dashboards.redact_keys with nested-array support plus POST-instead-of-GET (so log content no longer leaks into proxy/access logs) materially changes the risk conversation. This is the release that lets a PM say "yes, we can send production error context to a third party" without a redaction service bolted on — provided the team configures redact_keys deliberately.throw_on_failure) and surfaces API errors, a team can decide to start with Telegram logging now and migrate to structured observability later, without the migration being a rewrite — logging calls are unchanged (Log::error() behaves as before).throw_on_failure makes misconfiguration obvious in dev/staging; api_url supports proxies or self-hosted Bot API for teams with egress restrictions. Both reduce the "works on my machine / silent in prod" class of incidents.Consider it when:
dedupe_seconds and max_per_minute are the reason to pick this over a naive Monolog handler.api_url and the switch to POST make this viable where GET-based alternatives would leak payloads into access logs.throw_on_failure) and silent resilience in production.Look elsewhere when:
For executives: This is a small, free Laravel package that sends application errors to a Telegram chat. The v2.0.0 release is the first version we can responsibly put in front of production traffic: it fixes cases where alerts were silently lost, stops malformed messages from crashing the application, redacts secrets like passwords and tokens before anything leaves our servers, and rate-limits noise so the channel stays readable. It also stops putting log content into proxy access logs. In short: the alerting path is now trustworthy, inexpensive, and low-risk — a sensible interim step before committing budget to a commercial observability platform.
For engineering leads: The public API is unchanged — Log::error() and friends behave exactly as before — so adoption is a config-and-deploy, not a refactor. The real engineering value is the bug-fix list: byte-vs-character truncation that silently dropped long messages, exceptions thrown from inside the log listener that could take down the calling code, unread MarkdownV2 escaping of backslashes, and the fact that delivery failures were previously indistinguishable from success. Those are exactly the failure modes that make people stop trusting an alerting channel. Flood protection, nested redaction, and automatic plain-text retry on HTTP 400 are net-new resilience at no extra operational cost.
For the platform/upgrade conversation: The one real decision this release forces is the version floor — PHP 8.4+ and Laravel 13+. Teams on Laravel 12 stay on 1.x automatically; that's expected behaviour, not a broken update. So the question is simply: is our Laravel 13 upgrade on the roadmap, and does adopting this package give us a reason to bring it forward? Note also the config republish step (vendor:publish --tag=telegram-logger-config --force); an existing published config continues to work because every new setting falls back to a safe default, so this is an opt-in migration rather than a hard cutover.
Honest caveats to state up front: This is a single-maintainer package with no commercial support, and Telegram is best-effort with its own rate limits. Treat it as a transport for alerts, not as incident management, and not as a system of record. Set redact_keys deliberately rather than relying on defaults, and keep throw_on_failure limited to local/staging so production logging never becomes a source of outages.
How can I help you explore Laravel packages today?