debugged/apilogger 问题修复 & 功能扩展

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

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

debugged/apilogger

最新稳定版本:2.0.0

Composer 安装命令:

composer require debugged/apilogger

包简介

A Laravel package for logging API requests and responses

README 文档

README

A simple Laravel package to log API requests and responses.

Installation

You can install the package via composer:

composer require debugged/apilogger

Configuration

  1. Publish the migration:
php artisan vendor:publish --provider="debugged\ApiLogger\ApiLoggerServiceProvider" --tag="migrations"
  1. Run the migrations:
php artisan migrate
  1. Add the middleware to your app/Http/Kernel.php file in the $middlewareGroups array:
protected $middlewareGroups = [
    'api' => [
        // ... other middleware
        \debugged\ApiLogger\Http\Middleware\APILog::class,
    ],
];

Usage

Once installed and configured, the package will automatically log all API requests and responses to the logs table. Each log entry includes:

  • HTTP method
  • URL
  • IP address
  • User agent
  • Request data
  • Response data
  • Status code
  • Timestamps

License

The MIT License (MIT).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-27