orangecat/viewlog

Orangecat ViewLog Module

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 1

Open Issues: 0

Type:magento2-module

pkg:composer/orangecat/viewlog

1.0.1 2026-02-03 19:49 UTC

This package is auto-updated.

Last update: 2026-02-06 18:13:33 UTC


README

This module provides logging capabilities for GraphQL and REST API requests in Magento 2. It allows administrators to view detailed logs of API interactions, including request parameters, responses, and status codes.

Features

  • GraphQL Logging: Captures GraphQL queries, variables, responses, and execution times.
  • REST Logging: Captures REST API endpoints, request data, responses, and execution times.
  • Admin Interface: dedicated grids to view and filter logs.
  • Auto-Cleanup: Configurable retention period with automatic pruning via cron.

Installation

Install via composer:

composer require orangecat/viewlog
php bin/magento module:enable Orangecat_ViewLog
php bin/magento setup:upgrade

Configuration

Configuration is available under Stores > Configuration > Services > Magento Web API.

Graphql Logger Settings

  • Enable Graphql Logger: Turn GraphQL logging on/off.
  • Retention Days (Graphql): Number of days to keep logs before automatic deletion (Default: 30 days).

REST Logger Settings

  • Enable REST Logger: Turn REST logging on/off.
  • Retention Days (REST): Number of days to keep logs before automatic deletion (Default: 30 days).

Access

You can access the log viewers from the Admin Panel:

  1. GraphQL Logs: System > Tools > Graphql Logs
  2. REST Logs: System > Tools > REST Logs

Cron Jobs

The module includes a cron job that runs daily at 03:00 AM to clean up logs older than the configured retention period.

  • orangecat_graphqlviewlog_cleanup: Executes Orangecat\ViewLog\Cron\Cleanup::execute

Database Tables

  • orangecat_graphql_log: Stores GraphQL request logs.
  • orangecat_rest_log: Stores REST API request logs.