2017 © Pedro Peláez
 

library logger-aware-service

Abstract class to automatize loggin in own services

image

silvioq/logger-aware-service

Abstract class to automatize loggin in own services

  • Thursday, April 27, 2017
  • by silvioq
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Logger Aware Service for Symfony

This bundle injects @logger service to any service that extends Silvioq\LASBundle\LoggerAwareService, (*1)

Build Status, (*2)

Register your bundle, (*3)

# app/AppKernel.php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel 
{   
    public function registerBundles()
    {
        $bundles = [  
            ...
            new Silvioq\LASBundle\LoggerAwareService(),
        ];
    }
}

Declare your service ..., (*4)

# service.yml
service:
   my.awesome.service:
      class: My\AwesomeService

... and log anything, (*5)

```php, (*6)

My/AwesomeService.php

namespace My; use Silvioq\LASBundle\LoggerAwareService;, (*7)

class AwesomeService extends LoggerAwareService {, (*8)

public function awesomeFunction()
{
    // ...
    $this->getLogger()->info( "Log anything");
}

}, (*9)

The Versions

27/04 2017

v1.0.1

1.0.1.0

Abstract class to automatize loggin in own services

  Sources   Download

MIT

The Requires

 

The Development Requires

by Silvio

27/04 2017

dev-master

9999999-dev

Abstract class to automatize loggin in own services

  Sources   Download

MIT

The Requires

 

The Development Requires

by Silvio

27/04 2017

v1.0.0

1.0.0.0

Abstract class to automatize loggin in own services

  Sources   Download

MIT

The Requires

 

The Development Requires

by Silvio