定制 alexeyshchetkin/laravel-http-client-logger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

alexeyshchetkin/laravel-http-client-logger

最新稳定版本:1.0

Composer 安装命令:

composer require alexeyshchetkin/laravel-http-client-logger

包简介

README 文档

README

Laravel Http Client Logger - library for logging connection/request/response actions for Laravel HTTP Client

Installation

You can install the package via composer:

composer require alexeyshchetkin/laravel-http-client-logger

You can publish the config file with:

php artisan vendor:publish --provider="AlexeyShchetkin\LaravelHttpClientLogger\Providers\HttpClientLoggerServiceProvider" --tag="laravel-http-client-logger"

The contents of the published config file:

return [
    /*
     * Channel name for logging
     */
    'channel_name' => 'external_requests',
    /*
     * Channel log level
     */
    'log_level' => 'info',
    /*
     * Channel configuration in Laravel style
     */
    'channel_configuration' => [
        'driver' => 'daily',
        'path' => storage_path('logs/external_requests.log'),
        'formatter' => JsonFormatter::class,
        'level' => env('LOG_LEVEL', 'info'),
        'days' => 7,
    ],
    /*
     * Http client events for logging (comment not needed, add own if needed)
     */
    'events' => [
        ConnectionFailed::class => ConnectionFailedListener::class,
        RequestSending::class => RequestSendingListener::class,
        ResponseReceived::class => ResponseReceivedListener::class,
    ],
];

License

The MIT License (MIT).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-13