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

Monolog Extra Bundle Laravel Package

hexanet/monolog-extra-bundle

Symfony bundle that extends Monolog with extra logging tools, making it easier to enrich log records with additional context and configure richer logging pipelines in your application. It integrates with Symfony's service configuration for straightforward setup and minimal boilerplate.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — unchanged: poor as a dependency, good as a pattern source. Nothing in v3.0.2 alters the fundamental shape of the package. The distributable value remains a small set of Monolog processor classes and a request/response logging strategy; the surrounding Symfony DI glue (Bundle subclass, service configuration, compiler passes, autoconfiguration tags) still has no execution path in a Laravel application, which wires Monolog through config/logging.php and channel tap arrays. Two points from the prior assessment now require correction and one is reinforced:

  • Correction: the package is not dormant as previously stated. v3.0.2 implies an active 3.x line, so "last release 2018-11-14" is stale. A TPM should not repeat that claim in an approval document.
  • Correction (unresolved): the 2018-era symfony/framework-bundle constraint claim must be re-verified against the 3.x composer.json. It may be relaxed; it may not. Do not carry the old blocker forward untested — but do not assume it is lifted either.
  • Reinforced: the 3.x major means the extraction target is now Monolog 3-era code, which removes the largest chunk of the earlier refactor estimate (the typed __invoke(array $record): array signature). That is a genuine, if modest, cost reduction for the port.

Integration feasibility — still low for direct install, slightly better for extraction. The Composer resolution argument needs a fresh composer why-not test rather than a citation, but the architectural conclusion stands independently: a Symfony bundle cannot be composer required into a Laravel app to obtain behaviour, only to obtain dead weight and transitive constraints. What ports remains the processor classes, now presumably already on Monolog 3 types, dropping the port estimate from "small refactor pass" to "signature verification and a static analysis pass."

Technical risk — high, with the risk profile rotated rather than reduced.

  1. The "unmaintained" risk has become a "lightly maintained, poorly documented" risk. This is a lateral move, not an improvement. A single maintainer publishing a 3.x line is better than an archive, but the release note is a strong negative signal: one sentence, one typo ("nomalized"), no migration guidance, no linked PR or issue, no statement of affected configuration keys or default behaviour. For a change that alters the shape of emitted log records, that is inadequate release hygiene. Consumers cannot determine from the note whether their pipelines break.
  2. Log-schema instability is now a first-class concern. "Additions key is not normalized anymore" describes a change in the output contract of the logging path. Anything downstream that parses, indexes, or alerts on those keys — Elasticsearch mappings, Loki label extraction, Datadog facets, saved queries, dashboards — is a potential silent breakage. This is the class of change that produces empty dashboards rather than errors, which is worse.
  3. PII and secret exfiltration — unchanged and still the top-severity item. Body logging remains the headline feature and remains the most common cause of credential and customer-data leakage into log stores. Required redaction (Authorization, Cookie, Set-Cookie, password fields, PANs) is still not meaningfully provided.
  4. Blast radius on failure — unchanged. A throwing or recursive processor can wedge request handling or take down the logger. Still requires try/catch isolation and volume circuit-breaking.

Key questions for the team.

  • What exactly changed in the "additions" contract, and does any consumer of our logs key on those names? If we cannot answer from the release note alone, that is itself the finding.
  • Has the 3.x composer.json relaxed Symfony constraints, or does the 2018 blocker still hold? Re-test before reusing the old argument.
  • Is there a changelog, a tag history, or CI for the 3.x line, or is v3.0.2 a one-off commit? Release cadence is the best available proxy for whether fork ownership is still required.
  • What is the actual gap — structured request context, response body capture, correlation IDs, or latency metrics? Laravel covers most via Log::withContext(), middleware, RequestHandled, and Telescope.
  • Do we have a documented legal/compliance position on capturing response bodies in logs? If not, that feature is out of scope regardless of package quality.
  • Who owns the vendored copy, and how will we track drift now that drift is possible again?

Integration Approach

Stack fit — unchanged. Laravel's logging layer is Monolog underneath, so the concept fits cleanly even though the package does not. The idiomatic Laravel expression remains: middleware capturing request metadata and duration, Log::withContext([...]) for per-request correlation fields, and a channel-scoped tap class pushing one or two custom processors. No Symfony components required.

Migration path — extract, don't install (unchanged), with one new step.

  1. Read the 3.x processors; confirm which 1–3 map to a real requirement (likely request metadata enrichment and a response status/duration field).
  2. New: read the diff for the "additions" change specifically and decide whether we depend on either the old or new key shape. Normalize on our side at the boundary rather than inheriting the package's key conventions — this insulates us from the next unannounced schema change.
  3. Copy into app/Logging/Processors/, add declare(strict_types=1), verify Monolog 3 signatures, retain MIT attribution in a NOTICE file.
  4. Replace bundle configuration with a dedicated Laravel channel (e.g. http) so verbose request logging never contaminates application logs.
  5. Delete all Symfony-specific code. Expect to keep roughly 20–30% of the original by volume.

Compatibility. Validate against the monolog/monolog version resolved in composer.lock. The 3.x line likely reduces the PHP 8.2+ deprecation exposure cited earlier (dynamic properties, ${var} interpolation), but this must be checked, not assumed. Run PHPStan level 6+ over the vendored copy before it enters a shared branch. Add an assertion test that pins the exact record shape we emit, so an upstream additions-key change cannot propagate silently through a future re-vendor.

Sequencing. (1) Re-verify package facts — constraint graph, release history, changelog presence — because the prior assessment's data is now partly wrong. (2) Requirements spike: confirm the observability gap is real and not already covered. (3) Extraction + modernization behind a feature flag. (4) Redaction, size-capping, and record-shape assertion tests. (5) Canary on one low-traffic service for two weeks, measuring log volume delta and p99 latency. (6) Roll out or roll back. Still a background improvement, not a milestone; it should not block any other workstream.

Operational Impact

Maintenance. Movement from "permanent fork of an archived repo" to "permanent fork of a barely-documented low-activity repo" is a marginal improvement. There is now an upstream that might absorb Monolog majors and PHP minors, but the v3.0.2 note is evidence that consuming upstream changes blind is dangerous. Recommended posture: vendor the code, track upstream for security and compatibility signals only, and cherry-pick deliberately rather than following releases. Budget a recurring fraction of an engineer's time either way.

Support. No vendor, no SLA. There may now be an issue tracker, but the release-note quality suggests it is not a reliable support channel. Internal on-call still owns incidents. The LOG_HTTP_ENABLED=false kill switch remains mandatory, not optional, and — given the additions change — should be paired with the ability to revert log-schema changes independently of code deploys.

Scaling. Unchanged and still the dominant cost driver at volume. Request/response body logging scales non-linearly: file uploads, base64 blobs, PDFs, and large GraphQL responses inflate log lines into the megabytes, multiply shipping and storage across replicas, and can saturate aggregator ingest quotas during an incident — exactly when volume spikes. Enforce a hard byte cap per field, truncate with an explicit marker, skip non-text content types, and sample (headers/status always; bodies at 1–5%). The additions-key change adds a second scaling concern: schema churn forces index remapping and dashboard rework, which is cheap per-change and expensive in aggregate.

Failure modes to design against.

  • Silent schema drift (new, elevated): upstream changes the emitted record shape with no migration note; downstream parsers and alerts degrade to empty rather than erroring. Mitigate with pinned record-shape tests and normalization at our boundary.
  • Recursive logging: processor writes a line, which triggers the processor. Guard with a re-entrancy flag.
  • Disk exhaustion: daily channel without retention; set days and alert at 80% volume.
  • Silent data breach: unredacted tokens in a third-party log store — highest severity, least recoverable.
  • Latency injection: synchronous body serialization on the request path; measure and cap.
  • Total request failure: uncaught processor exception; wrap in try/catch and degrade to no-context.

Ramp-up. Technical ramp-up drops slightly — 3.x-era code means less modernization work — but the organizational ramp-up is unchanged and still the real cost: establishing a log-redaction standard, agreeing on retention, and getting sign-off that owning a fork of a thinly documented upstream is acceptable. The recommendation also stands, with a sharper rationale: build a narrow in-house equivalent using this as a design reference. The value is unchanged; the dependency risk is no longer "abandoned" but "unpredictable," and for a component on the request hot path and in the log-schema contract, unpredictable is not meaningfully better than abandoned. The v3.0.2 release note is the clearest available evidence of what upstream maintenance will look like.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource