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

Advanced Logger Laravel Package

dejwcake/advanced-logger

Advanced Logger is a Laravel/PHP package that extends the framework's logging with configurable channels, richer context, and structured output, making it easier to capture, organize, and review application events in development and production with minimal setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a Laravel-native package providing request logging with a hash-based log customizer, a service, and a listener handler. Its shape — service class plus framework listener handler plus config-driven customizer — is idiomatic Laravel and fits a standard middleware/event-listener slot in our request lifecycle. There is no architectural conflict with a conventional Laravel app; the fit question is not whether it slots in but how much of our request pipeline we want it touching and what it does with the payloads it captures.

Integration feasibility. Low effort. Composer install, publish config, register the listener/middleware, set hashing rules. No service provider gymnastics implied by the release notes. The 2.0.1 changes are internal hardening and packaging hygiene, not integration work.

Technical risk. The release note claims "nothing to do when upgrading," and for the median consumer that is probably accurate — but the claim is not universally true and should not be taken at face value:

  • final is a breaking change in disguise. Any consumer that subclasses RequestLogger, RequestLoggerService, HashLogCustomizer, or RequestLoggerListenerHandler will fatal on upgrade. More common in practice: test suites that mock these classes (Mockery/PHPUnit cannot mock final classes) will break, and the failure will surface as test errors, not as an upgrade error. This is the single highest-likelihood upgrade incident.
  • readonly requires PHP 8.2+. Declaring readonly class silently raises the package's effective minimum PHP. If we are on PHP 8.0/8.1 anywhere in the fleet, 2.0.1 is not installable and Composer will resolve us back to an older tag — a silent version skew rather than a loud failure.
  • readonly also removes post-construction mutability. If any integration mutates logger/config state after instantiation (setters, reflection, container rebinding tricks), behavior changes.
  • Minor semver hygiene concern. Making previously-open classes final readonly is arguably a major-version event. Delivering it in a patch release means we cannot rely on the version number alone to signal risk; we must verify ourselves.
  • Low-risk items. export-ignore for tests/Docker/QA config only affects dist installs and only matters if we run the package's own test suite in our pipeline or vendor the source. phpmd 3 and CI coverage are contributor-facing only. AGENTS.md/CLAUDE.md are noise for us.

Net: risk is low but concentrated in test infrastructure, and the release notes understate it.

Key questions.

  1. Do we extends any of the four newly-final classes anywhere in our codebase or in test doubles? (Grep for extends RequestLogger, Mockery::mock(RequestLogger, createMock(.)
  2. What is our minimum PHP across all environments that would install this — are we fully on 8.2+?
  3. If the classes are now closed, what is the sanctioned extension point — config, container binding against an interface, or events? Is there an interface we should depend on instead of the concrete class?
  4. Does HashLogCustomizer hashing satisfy our PII/redaction requirements, and is that behavior stable across this release (notes say no behavioral change — confirm)?
  5. Is this package on the request critical path (middleware) such that a logging exception fails the request, or is it fire-and-forget?

Integration Approach

Stack fit. Standard Composer package for Laravel; no non-PHP runtime dependencies introduced. The move to final readonly signals the maintainer is tightening the object model — a good sign for long-term stability, but it means our integration must consume the package through configuration and container bindings, not inheritance. Treat the four classes as internal implementation from here on.

Migration path. We have no prior assessment, so 2.0.1 is our baseline rather than a migration. If any environment is already on 2.0.0, the upgrade is a composer update plus the verification steps below. Given the final/readonly changes, pin explicitly ("^2.0.1") rather than floating, and let Renovate/Dependabot surface 2.x patches for review rather than auto-merging — the patch-level BC break here is the justification.

Compatibility. Two hard gates before adoption:

  • PHP >= 8.2 in every environment that resolves the package (CI matrix, staging, prod, and any queue workers running the listener).
  • No inheritance or mocking of the four affected classes. If we need custom behavior, either use the config surface or wrap the package behind our own thin adapter interface that we can mock. That adapter is cheap insurance and decouples our tests from the package's final decisions.

Sequencing.

  1. Confirm PHP version floor across CI and runtime targets.
  2. Grep for extends/mock/createMock against the four class names; fix any hits by introducing the adapter or switching to interface-based fakes.
  3. Install in a feature branch, run the full test suite — treat test failures as the primary signal, since runtime behavior is reportedly unchanged.
  4. Deploy to staging with production-like log volume and verify redaction output on real request shapes.
  5. Roll to production behind the existing config flag; keep the ability to disable the listener without a deploy.
  6. Separately note that a dist install no longer ships package tests — if our pipeline ran them, that step disappears (or must switch to --prefer-source).

Operational Impact

Maintenance. Low. Patch releases appear to be hygiene-focused, the maintainer is investing in QA tooling (phpmd 3, coverage reporting, agent docs), and the dependency surface is small. The main ongoing cost is upgrade diligence: because BC-affecting class-model changes shipped in a patch, we should read notes rather than trust semver. Budget a short review per release, not a full re-evaluation.

Support. Single-maintainer-style risk profile is typical for packages of this size; no commercial backing implied. Mitigation is the adapter layer — if the package stalls, we can swap or vendor it without touching call sites. Ensure someone owns the upgrade path; an unowned logging package that silently accumulates CVEs or PHP-version incompatibility is a slow-burning problem.

Scaling. The dominant operational variable is log volume and payload size, not CPU. Request logging scales linearly with traffic and can dominate log storage/ingest cost — hashing does not reduce volume, it only reduces sensitivity. Plan for sampling or path-based exclusion at moderate-to-high RPS, and confirm the write path is buffered/async so a slow log sink cannot add latency to every request. Watch for large request bodies being captured wholesale.

Failure modes.

  • Upgrade-time: final class fatals on subclassing; broken test doubles; PHP-version resolution silently downgrading the package. All caught pre-merge if the verification sequence above is followed.
  • Runtime: logging exception propagating into the request path (mitigate by ensuring failures are swallowed); log-write backpressure under traffic spikes; disk/log-quota exhaustion from unstructured growth.
  • Redaction failure (highest severity, lowest visibility): a malformed hashing rule or an unhashed field path silently writing PII to logs. This is the failure that costs the most and fails quietly — validate redaction explicitly against representative payloads on every upgrade, not just the first.
  • Packaging: dist installs lacking package tests means we can't easily reproduce upstream issues locally; use --prefer-source when debugging.

Ramp-up. Minimal for a Laravel developer — config file plus a listener registration. The learning curve is in the redaction semantics of HashLogCustomizer, not the API. Onboarding should cover: which fields are hashed, why, how to add a field, and how to verify a change. Write that down once; it is the artifact that prevents the quiet PII failure above.

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