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

Oro Api Logger Laravel Package

25carat/oro-api-logger

Logs all OroCommerce REST API requests and responses for monitoring integrations. Adds a dedicated api_logger channel writing to api-logger-[env].log with configurable minimum level; headers at info, bodies at debug, client errors at error, server errors at critical.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Debugging & Observability for API-Driven Features: Accelerates resolution of integration issues (e.g., third-party API failures, payload validation errors) in OroCommerce-based products by providing granular logging of REST API traffic. Critical for headless commerce, B2B portals, or any API-heavy roadmap.
  • Compliance & Auditing: Enables capture of critical/error-level logs (e.g., 4xx/5xx responses) to meet regulatory requirements like GDPR (data access logs) or PCI-DSS (transaction trails) without custom development.
  • Performance Optimization: Logs at info/debug levels allow teams to analyze latency bottlenecks (e.g., slow API responses, payload size) or middleware issues without modifying core code.
  • Build vs. Buy Decision: Avoids reinventing API logging infrastructure, reducing technical debt while maintaining flexibility (MIT license permits modifications). Justifies investment in API-first features by providing a low-effort observability layer.
  • Use Cases:
    • Troubleshooting: Debugging failed API calls in OroCommerce integrations (e.g., ERP, PIM, or marketplace connectors).
    • Monitoring: Tracking third-party API consumers (e.g., mobile apps, SaaS integrations) for errors or anomalies.
    • Custom API Development: Logging for custom API endpoints or middleware in OroCommerce extensions.
    • Post-Mortems: Auditing API traffic during incidents (e.g., outages, data corruption) to identify root causes.

When to Consider This Package

  • Adopt if:
    • Your product relies on OroCommerce’s REST API (v5.x/6.x) for core integrations or customer-facing features.
    • You lack a dedicated API monitoring tool (e.g., no ELK/Logstash setup for Oro logs) and need a lightweight solution.
    • Your team requires fine-grained control over log verbosity (e.g., exclude sensitive data from debug logs while capturing errors).
    • You’re building an API-first product (e.g., headless commerce, B2B portals) and need observability without heavy infrastructure.
    • You need compliance-ready logs (e.g., audit trails for financial transactions) without custom development.
  • Look elsewhere if:
    • Your stack uses non-OroCommerce APIs (this package is Oro-specific; consider generic solutions like Laravel’s illuminate/log or Symfony’s Monolog).
    • You require real-time monitoring (e.g., dashboards, alerts) beyond logging (pair with Sentry, Datadog, or Laravel Horizon).
    • Your existing logging setup already captures structured API metadata (e.g., JSON logs for analytics) and this package’s raw text output is insufficient.
    • Your team lacks PHP/Laravel expertise to configure the package (minimal setup required but assumes familiarity with Oro’s service container).
    • You need async logging for high-throughput APIs (this package logs synchronously during request/response cycles).

How to Pitch It (Stakeholders)

For Executives: "This package acts as a ‘black box recorder’ for our OroCommerce API, capturing every request and response to slash debugging time and ensure compliance. For example, if a critical marketplace integration fails, we’ll instantly see the exact payload and error—cutting resolution time by 50% with zero upfront cost. It’s a no-code solution that scales with our API-heavy roadmap (e.g., headless commerce, B2B portals) and aligns with GDPR/PCI-DSS requirements. We’ll start with error-level logs to avoid noise, then enable debug for deep dives as needed. The MIT license lets us modify it if required, and it’s maintenance-free beyond basic configuration."

For Engineering: *"The 25carat/oro-api-logger is a decorator-based solution that wraps Oro’s RestApiController to log raw HTTP traffic (headers/bodies) to a dedicated channel (api_logger). Key advantages:

  • Zero core code changes: Uses dependency injection to override the controller, avoiding merge conflicts.
  • Configurable verbosity: Set log levels per environment (e.g., debug in staging, error in prod) via parameters.yml.
  • Separation of concerns: Logs go to api-logger-[env].log, keeping main logs clean.
  • Oro 6.x support: Future-proof for our upgrade path. Tradeoffs:
  • No built-in alerting: We’d pair this with Sentry or Datadog for error notifications.
  • Synchronous logging: Could impact performance under high load if debug is enabled (mitigate by starting with info/error).
  • Sensitive data risk: Logs may include PII in request/response bodies—we’ll need to sanitize or encrypt logs in production. Proposal: Let’s prototype this for the [Marketplace Integration] epic first, focusing on error-level logs to validate value before expanding scope."*

For Security/Compliance: *"This package provides audit-ready logs for OroCommerce API traffic, capturing:

  • Critical errors (5xx responses) as critical logs.
  • Client errors (4xx responses) as error logs.
  • Headers/metadata at info level for debugging. We’ll configure it to exclude sensitive data (e.g., tokens, PII) from logs by default, using environment-specific sanitization rules. Logs can be archived centrally (e.g., AWS S3 with lifecycle policies) to meet GDPR retention requirements without custom development."*
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