orangecat/viewlog 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

orangecat/viewlog

最新稳定版本:1.0.1

Composer 安装命令:

composer require orangecat/viewlog

包简介

Orangecat ViewLog Module

README 文档

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.

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2026-02-03