ytake/laravel-fluent-logger
Laravel package that integrates Fluentd logging into your app. Configure a Fluentd channel in config/logging.php and ship structured logs to your aggregator via fluent-logger, with a service provider and facade for quick, minimal setup.
Architecture fit. ytake/laravel-fluent-logger is a thin adapter: it registers a Laravel logging channel that wraps a Monolog handler, which in turn uses the official fluent/logger client to ship records to Fluentd over the forward protocol (TCP 24224 or a Unix socket, MessagePack-encoded). It has no domain coupling and no invasive service-provider magic beyond Log::extend-style channel registration, so it sits cleanly at the observability edge of the application. The important caveat is that fit is a function of deployment topology, not code quality: this package makes the PHP process itself a network client of Fluentd. That is idiomatic for VM/bare-metal Laravel with a co-located td-agent, and it is against the grain for containerized/Kubernetes deployments, where the convention is "log to stdout and let a node-level DaemonSet (Fluent Bit/Fluentd) collect." In that world the package adds a blocking network hop the platform didn't ask for. 8.0.0 does not change this assessment — it is a compatibility release, not an architectural one.
Integration feasibility. Low effort. composer require ytake/laravel-fluent-logger, publish config, add a fluent channel to config/logging.php, reference it from a stack. Lumen needs manual $app->register(...) in bootstrap/app.php. A competent Laravel engineer has a working proof of concept in under a day; the work is in Fluentd-side configuration (match/tag routing, buffering, outputs), not in the PHP package.
Technical risk.
@fish3046), which is the first evidence of anyone besides the maintainer touching the repo. Treat it as "adopt the pattern, not the vendor."composer.json constraint edit wearing a major version; (b) a major bump implies something broke — most likely illuminate/* was narrowed to ^12.0, dropping older Laravel support. If so, teams on Laravel 10/11 must pin ^7.0, and teams on Laravel 12 must take ^8.0. Read the 7.0.0...8.0.0 diff before assuming a drop-in upgrade.Key questions to resolve before committing.
illuminate/*, monolog/monolog, and php constraints, and does the handler extend AbstractProcessingHandler in a Monolog-3-compatible way?composer.json.^10|^11|^12) or narrow them (^12 only)? This determines whether it is a safe composer update or a hard fork in the road that strands Laravel 10/11 services on 7.x.tests/ and composer.json? If only tests changed, the major bump is a constraint declaration and the runtime risk profile of 7.0.0 carries over verbatim — including any unresolved failure-mode behavior.config/logging.php custom drivers (Laravel 5.6+), or does it rely on the deprecated configureMonologUsing hook?time field or from the PHP clock (skew implications)?Stack fit. Revised upward: Laravel 10–12 (12 confirmed by the 8.0.0 test fix; 10/11 only if the constraint permits), PHP 8.2+ on the 8.x line, Monolog 3. If you are on Laravel 8/9 or PHP 8.1, you are on the 7.x line and should assume the Monolog 3 question is unanswered for you. Fits naturally if you already operate Fluentd and want tag-based routing to Elasticsearch/OpenSearch, BigQuery, S3, or Kafka without writing a custom handler. Fits poorly if your platform team's logging standard is stdout-only.
Migration path. Do not swap the default channel. Add fluent as an additional channel and attach it to a stack alongside the existing daily/stderr channel for a defined overlap period. This gives you a zero-downtime rollback (drop the channel from the stack) and a ground truth to diff against. Only after parity is demonstrated should the file channel be demoted to error-only.
Upgrade sequencing for 7.x → 8.x. Treat this as a version-line decision, not a patch. Inventory every service pinned to the package and its Laravel version first; the 8.0.0 bump likely splits your estate into "Laravel 12 / package 8.x" and "Laravel ≤11 / package 7.x." That is acceptable — the package is small and the two lines differ mainly in constraints — but it must be deliberate, because a shared internal fork or a shared composer.lock template will otherwise force an unintended framework upgrade. Resolve question 2 before the first composer update in CI, or you will discover the split via a red build.
Compatibility checks to run as gates, not as hopes.
7.0.0...8.0.0 and read composer.json at the tag before installing anything.php artisan octane:reload.LOG_CHANNEL=stack and with LOG_LEVEL filtering, since Monolog level handling is a common source of "why is nothing arriving."Sequencing.
error.Maintenance. You are taking on two maintenance surfaces, not one: the PHP package (and its fluent/logger transitive dependency) and the Fluentd deployment. The first is cheap — the code is small and forkable — and 8.0.0 is the first concrete signal that the package tracks new Laravel majors rather than being abandoned. But the signal is thin: the work was a test-matrix fix contributed by a community member, not a maintainer-led modernization, and it arrived as a major bump that strands older framework versions. Keep the annual "does it still install on the current framework" check, and keep the pre-authorization to fork into a vendor namespace if the maintainer goes quiet again.
Support. No commercial backing, no SLA, single-author response times. Internal ownership is still mandatory; there is no one to escalate to at 3 a.m. The team owning this should be the same team that owns the Fluentd configuration, otherwise you get the classic split where app engineers blame the log pipeline and platform engineers blame the app.
Scaling. The scaling unit is connections, not throughput. Each PHP-FPM worker (or Octane worker) holds its own socket to Fluentd, so a 200-worker fleet means 200 persistent connections to a single Fluentd node — plan a Fluentd aggregator tier or a load-balanced endpoint, and watch ulimit/file descriptors on both sides. Per-request latency increases by roughly one local-network write plus serialization; measure it, don't estimate it. Throughput is generally fine because Fluentd buffers, but that buffer is on the Fluentd side; the PHP side has little to absorb a burst.
Failure modes to design against.
<match> block and are dropped, which looks exactly like "the app isn't logging."LOG_LEVEL/stack config, which makes "logging is broken everywhere" investigations harder to reason about. Pin explicitly per service.Ramp-up. Low for application engineers — the package is a config change and the Laravel logging abstractions are familiar. The real learning curve is Fluentd: tags, match routing, buffer/flush/retry semantics, and how to prove a log line reached its destination end-to-end. That is a platform-team skill, not an app-team one. Produce two artifacts before rollout: a one-page runbook ("Fluentd unreachable — what to check, what to expect from the app") and a smoke test that emits a uniquely-tagged record and asserts its arrival downstream. Without the latter, every future logging incident becomes an argument about whose layer is broken.
Recommendation. Adopt if you already run Fluentd and are on VMs or a non-Kubernetes runtime with a local agent; the package is a reasonable, replaceable adapter and the cost of entry is a day. 8.0.0 makes it a viable choice for Laravel 12 teams for the first time, which is a genuine change from the prior assessment — but read the diff before trusting the major version's semantics. Do not adopt as a way to introduce structured logging into a container platform — in that case, log to stdout and let the node collector do the forwarding, and spend the effort on your Fluent Bit/Fluentd configuration instead. Either way, resolve the constraint-widening question and the failure-mode behavior before this appears in a production stack channel.
How can I help you explore Laravel packages today?