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

Logger Plugin Laravel Package

php-http/logger-plugin

PSR-3 logger plugin for HTTPlug (php-http). Logs HTTP requests/responses made through your HTTPlug client, helping you debug and monitor outgoing traffic. Install via Composer and configure with your preferred PSR-3 logger implementation.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Debugging & Observability: Enhanced request URI logging (1.5.0) improves API endpoint visibility, critical for debugging granular issues (e.g., distinguishing /api/v1/payments from /api/v1/refunds in logs). Reduces time spent correlating endpoints with failures or latency.
  • Compliance & Auditing: URI inclusion strengthens audit trails for endpoint-specific access logs (e.g., GDPR subject access requests targeting /user/profile). Supports granular filtering in SIEM tools (e.g., "All /admin/* requests").
  • Performance Optimization: URI context enables endpoint-level latency analysis (e.g., "Stripe /charges endpoint averages 800ms vs. 200ms for /webhooks"). Helps prioritize optimizations for critical paths.
  • Cost Control: Logs can now map API costs to specific endpoints (e.g., "Twilio /messages costs $X vs. /lookups"). Useful for optimizing high-volume or expensive endpoints.
  • Build vs. Buy: Eliminates need for custom URI logging middleware, further reducing technical debt. Aligns with Laravel’s observability stack (e.g., pairing with laravel-debugbar for endpoint-specific insights).
  • Roadmap Alignment: URI context enhances OpenTelemetry compatibility by providing richer span attributes for distributed tracing (e.g., http.url in OpenTelemetry specs).

When to Consider This Package

Use When:

  • Your Laravel app requires endpoint-level visibility for HTTP calls (e.g., distinguishing /api/v1/users from /api/v1/roles in logs).
  • You need granular debugging for API integrations (e.g., "Why is this specific URI failing?").
  • Compliance audits demand endpoint-specific logging (e.g., tracking access to /admin/*).
  • You’re adopting OpenTelemetry and need URI attributes for spans.
  • Existing URI logging (e.g., Guzzle’s default) is insufficient for your use case.

Look Elsewhere If:

  • You’re using non-HTTP clients (e.g., cURL directly) or Guzzle without HTTPlug.
  • URI logging adds unnecessary noise (e.g., for high-volume, low-variability endpoints like /health).
  • Your stack uses non-PSR-3 loggers or OpenTelemetry with custom URI handling (may need adapters).
  • Performance is critical for high-throughput APIs (consider log sampling or async logging).
  • You’re already logging URIs via alternative tools (e.g., monolog/handler with custom processors).

How to Pitch It (Stakeholders)

For Executives: *"The latest update (1.5.0) adds endpoint-level visibility to our HTTP logging—like GPS coordinates for API calls. Now we can:

  • Debug faster: Pinpoint exactly which API endpoint is failing (e.g., /payments/process vs. /payments/refund).
  • Optimize costs: See which endpoints drive third-party spend (e.g., ‘Twilio’s /messages costs 3x more than /lookups’).
  • Audit precisely: Filter logs by URI for compliance (e.g., ‘Show me all /admin/* requests’). It’s a zero-cost upgrade to our existing logging setup, and it works seamlessly with tools like Datadog or OpenTelemetry. Let’s pilot it on our highest-risk API (e.g., Stripe) to validate the ROI."*

For Engineers: *"The new request.uri context in 1.5.0 makes logs way more actionable. Example:

// Before: Generic log line for Stripe API calls
// After: Clear endpoint distinction
[2023-10-01] INFO  Stripe API call (uri: /v1/charges, status: 200, duration: 150ms)

// Use case: Debugging a flaky refund endpoint
grep '/refunds' storage/logs/laravel.log | grep '500'

// Pro tip: Pair with Laravel’s `tap` for dynamic URI logging:
$client->get('/api/v1/users')->tap(function ($response) {
    logger()->info('URI context', ['uri' => $response->getEffectiveUri()]);
});

No breaking changes—just drop the updated package and start seeing URIs in your logs. Start with a problematic API to validate the value."*

For DevOps/SRE: *"This update supercharges our HTTP observability by adding URI context, which helps us:

  • Correlate endpoints with business events (e.g., ‘Order #123 failed at /payments/process’).
  • Alert on endpoint-specific failures (e.g., ‘Stripe /charges >500ms’).
  • Archive logs by URI for compliance (e.g., ‘All /admin/* requests for audit’). Proposal: Update the package in our [logging standard] and configure it to include URIs in [existing tool]. Start with the /api/v1/payments endpoint to validate the signal quality."*
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.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony