承接 nixilla/api-logger-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nixilla/api-logger-bundle

Composer 安装命令:

composer require nixilla/api-logger-bundle

包简介

API logger bundle help your app with API calls monitoring

关键字:

README 文档

README

Version Build Status Coverage Status Scrutinizer Code Quality License

Versions

For buzz<0.16 please use nixilla/api-logger-bundle:^0.4 and for latest buzz:^1, use nixilla/api-logger-bundle:^0.5.1

Installation

Step 1: composer

composer require nixilla/api-logger-bundle

Step 2: enable bundle by adding it to AppKernel

<?php

    // app/AppKernel.php

    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
        // your other dev bundles here
        $bundles[] = new Nixilla\Api\LoggerBundle\NixillaApiLoggerBundle();
    }

Step 3: configuration

For latest buzz all you need to do is add this line into config/packages/buzz.yml

services:
    Buzz\Browser:
        arguments: ['@Buzz\Client\BuzzClientInterface', '@Psr\Http\Message\RequestFactoryInterface']
        calls:
            # other middleware classes here
            - ['addMiddleware', ['@Nixilla\Api\LoggerBundle\Middleware\ApiLoggerMiddleware']]

For earlier version of buzz <0.16 and earlier version of this bundle <0.5 you need to configure like this:

If you're use HWIOAuthBundle and you want to monitor all OAuth API calls, you can now override default hwi_oauth.http_client service used by this bundle by adding this few lines to your config_dev.yml file

# app/config/config_dev.yml
imports:
    - { resource: config.yml }

parameters:
    buzz.client.class: Nixilla\Api\LoggerBundle\Proxy\Buzz\Client\Curl

services:
    hwi_oauth.http_client:
        class: "%buzz.client.class%"
        calls:
            - [ "setLogger", [ "@nixilla.api.logger" ] ]

If you're using sensio/buzz-bundle, you may want to override the buzz.client in config_dev.yml

# app/config/config_dev.yml
imports:
    - { resource: config.yml }

parameters:
    buzz.client.class: Nixilla\Api\LoggerBundle\Proxy\Buzz\Client\Curl

services:
    buzz.client:
        class: "%buzz.client.class%"
        calls:
            - [ "setTimeout", [ "%buzz.client.timeout%" ] ]
            - [ "setLogger", [ "@nixilla.api.logger" ] ]

If you're using twilio/sdk you may want to override their Http Client in config_dev.yml

# app/config/config_dev.yml
imports:
    - { resource: config.yml }

services:
    
    twilio.http.client:
        class: Nixilla\Api\LoggerBundle\Proxy\Twilio\CurlClient
        calls:
            - [ "setLogger", [ "@nixilla.api.logger" ] ]
            
    twilio.rest.client:
        class: Twilio\Rest\Client
        arguments: [ "%twilio.username%", "%twilio.password%", ~, ~, '@twilio.http.client']

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-09-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固