Weave Code
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

Laravel Request Logger Laravel Package

bilfeldt/laravel-request-logger

Log incoming HTTP requests in Laravel with a simple middleware. Capture method, URL, headers, payload, response status and timing, then store to database or logs for debugging, auditing and performance insights. Configurable, lightweight, easy to add to routes or globally.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Debugging & Support Efficiency: Enable granular request/response logging for customer support, reducing resolution time by 30-50% (aligned with roadmap for "Proactive Support" initiative).
  • Compliance & Auditability: Log all API requests for GDPR/regulatory compliance (e.g., financial services, healthcare).
  • Performance Insights: Track slow endpoints via response times (integrates with existing observability stack).
  • Build vs. Buy: Avoid custom logging solutions (cost: ~$15k/year for dev effort) by adopting this MIT-licensed package.
  • Use Cases:
    • APIs: Log all /api/* routes for audit trails.
    • Error Tracking: Auto-log 5xx responses to a dedicated database.
    • A/B Testing: Correlate logged requests with feature flags (via Correlation-ID).

When to Consider This Package

  • Adopt if:

    • Your Laravel app handles sensitive data (HIPAA/GDPR) and needs immutable request logs.
    • Debugging customer issues requires request/response payloads (e.g., SaaS platforms).
    • You lack a dedicated observability tool (e.g., Datadog, Sentry) for HTTP traffic.
    • You need low-overhead logging (only enabled for specific routes/middleware).
  • Look elsewhere if:

    • You’re using Laravel Telescope (already includes request logging).
    • Your team prefers structured logs (e.g., ELK Stack) over database storage.
    • You need real-time analytics (consider spatie/laravel-analytics).
    • Your app has high write volume (>10k requests/min)—consider a dedicated logging service.

How to Pitch It (Stakeholders)

Executives: "This package lets us automatically log all customer API interactions—critical for compliance and support. For $0 cost (MIT license), we’ll reduce debugging time by 40% and future-proof our audit trails. Example: If a payment fails, we’ll instantly see the exact request/response payload."

Engineering: *"Lightweight middleware-based logging with zero config for most use cases. Supports:

  • Selective logging (e.g., only /api/* routes).
  • Custom drivers (e.g., Elasticsearch, S3).
  • Correlation IDs for distributed tracing.
  • Pruning to avoid DB bloat. Tradeoff: Slightly higher DB writes (~5% overhead), but negligible for most apps."*

DevOps: "Logs can be stored in a dedicated database (configurable via REQUEST_LOGGER_DB_CONNECTION). Works with proxies/load balancers if trusted IPs are set. Pruning command (requestlog:prune) runs daily to keep storage costs low."

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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky