2017 © Pedro Peláez
 

symfony-bundle api-logger-bundle

API logger bundle help your app with API calls monitoring

image

nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  • Thursday, June 21, 2018
  • by nixilla
  • Repository
  • 2 Watchers
  • 3 Stars
  • 6,112 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 1 % Grown

The README.md

API Logger Bundle

Version Build Status Coverage Status Scrutinizer Code Quality License, (*1)

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, (*2)

Installation

Step 1: composer, (*3)

composer require nixilla/api-logger-bundle

Step 2: enable bundle by adding it to AppKernel, (*4)

<?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, (*5)

For latest buzz all you need to do is add this line into config/packages/buzz.yml, (*6)

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:, (*7)

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, (*8)

# 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, (*9)

# 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, (*10)

# 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']

The Versions

08/02 2017

0.3.3

0.3.3.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

The Development Requires

api logging

07/06 2016

0.3.2

0.3.2.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

The Development Requires

api logging

10/05 2016

0.3.1

0.3.1.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

api logging

17/03 2016

0.3

0.3.0.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

api logging

09/10 2013

0.2.1

0.2.1.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

api logging

08/10 2013

0.2.0

0.2.0.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

api logging

18/09 2013

0.1.4

0.1.4.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

api logging

18/09 2013

0.1.3

0.1.3.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

api logging

09/09 2013

0.1.2

0.1.2.0 https://github.com/nixilla/api-logger-bundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

api logging

09/09 2013

0.1.1

0.1.1.0 https://github.com/nixilla/ApiLoggerBundle

API logger bundle help your app with API calls monitoring

  Sources   Download

MIT

The Requires

 

api logging