predanie/bitrix24-monolog-bundle
A Monolog bundle for Bitrix24 that adds a ready-to-use logging channel to Laravel and PHP projects. Configure your credentials and log levels, then route application logs straight to Bitrix24 through its REST API with minimal setup and sensible defaults.
Architecture fit. Despite the request framing this as a Laravel package, predanie/bitrix24-monolog-bundle is a Symfony bundle wrapping a Monolog handler that forwards log records to Bitrix24 (most likely via inbound webhook / REST). Laravel does use Monolog under the hood, but it does not use Symfony bundles as its extension mechanism — it uses service providers and config/logging.php channel definitions. That means the bundle shell is effectively dead weight for a Laravel codebase; the only reusable asset is the underlying handler class. The integration therefore collapses to: "can we lift the handler out of the Symfony wiring and register it as a Laravel log channel?" That is a small surface area, which is the one favorable architectural data point.
Integration feasibility. Low out of the box, moderate with a fork. The blocker is version drift: last release was November 2018, meaning the bundle almost certainly targets Monolog 1.x and Symfony 3/4-era HandlerInterface signatures. Current Laravel (10/11) ships Monolog 3.x, where HandlerInterface::handle() and AbstractProcessingHandler have different contracts (notably the LogRecord object and isHandling/write signatures). A direct composer require is unlikely to resolve cleanly and, even if it does, the handler will fatal at runtime on type mismatch. Feasibility is contingent on a ~half-day spike to confirm the Monolog version constraint in its composer.json and whether write() is isolated from Symfony DI. If the handler is a clean AbstractProcessingHandler subclass, porting is straightforward; if it leaks Symfony services (HTTP client, config resolver), the effort roughly doubles.
Technical risk. High, concentrated in abandonment rather than complexity:
Key questions to resolve before commitment.
write() free of Symfony container dependencies?Stack fit. Poor as a drop-in, workable as a vendored handler. Treat the package as reference source, not a dependency. The realistic target is a thin internal package — e.g. acme/laravel-bitrix24-logger — that contains a Bitrix24Handler extends AbstractProcessingHandler (Monolog 3 signature) plus a Laravel service provider and a bitrix24 channel stub.
Migration path.
composer.json constraints and the handler class. Confirm whether it uses Symfony's HTTP client and config resolver or is self-contained. Decision gate: fork-and-port vs. write-from-scratch.handle()/write() against Monolog 3's LogRecord, replace Symfony DI with constructor-injected config (webhook URL, minimum level, timeout), and swap the HTTP client for Laravel's Http facade or Guzzle.config/logging.php as 'driver' => 'monolog', 'handler' => Bitrix24Handler::class with a via/with config array. This is the idiomatic Laravel seam and avoids any bundle machinery.error and above by default), buffering or WhatFailureGroupHandler-style swallowing, explicit timeouts, and a circuit-breaker or sampling rule.Compatibility. Pin nothing from the original package. Declare monolog/monolog: ^3.0, illuminate/support: ^10|^11, php: ^8.1. If the team is still on Laravel 9/Monolog 2, either branch the handler or defer. Verify the Bitrix24 endpoint against current API docs — the webhook message format (imbot.message.add or im.message.add) has version-sensitive fields.
Sequencing. Port and unit-test first (no external dependency), then wire the channel behind a feature flag, then canary in a single non-critical service at error level only, then expand by service and level. Do not route all application logs on day one — start narrow and widen only after observing payload volume and Bitrix24 rate-limit behavior.
Maintenance. The real cost is ownership transfer. With zero upstream activity since 2018, every future PHP/Monolog/Laravel upgrade is your team's work. Budget a recurring small allocation (a day or two per major framework bump) and assign a named owner. Mitigate by keeping the handler deliberately small — a few hundred lines — so a rewrite is always cheaper than a rescue.
Support. No vendor support, no maintainer, no issue history to mine. Internal documentation becomes the only source of truth; write the runbook at fork time, not after the first incident.
Scaling. Two axes matter. Volume: one HTTP call per log record will not scale — at even modest error-log rates you will saturate outbound connections and risk Bitrix24 rate limiting. Require batching or a BufferHandler/FingersCrossedHandler wrapper, and default to error+ only. Fan-out: if many services adopt the channel, centralize the webhook credential and endpoint in shared config rather than duplicating secrets.
Failure modes.
WhatFailureGroupHandler and never let log transport break the request.Ramp-up. Low-to-moderate. A developer unfamiliar with Monolog internals needs roughly a day to understand handler lifecycle (isHandling → handle → write → close) and the Bitrix24 payload contract. The bundle's Symfony scaffolding adds conceptual noise; stripping it early actually reduces onboarding cost. Recommend pairing the fork with a short internal README covering the channel config, redaction rules, and the canary procedure.
TPM recommendation. Do not adopt as a dependency. Use it as a reference implementation, fork the handler under MIT into a small internal Laravel package with tests and redaction, ship behind a feature flag at error level only, and treat Bitrix24 as a notification side-channel rather than a logging backend. The opportunity-value score (0.03) and empty adoption metrics argue against any bet that assumes upstream will be maintained.
How can I help you explore Laravel packages today?