2017 © Pedro Peláez
 

library logger-trait

Extend \Psr\Log\LoggerAwareTrait

image

elementary/logger-trait

Extend \Psr\Log\LoggerAwareTrait

  • Sunday, March 18, 2018
  • by elementary
  • Repository
  • 1 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 11 % Grown

The README.md

Extention of \Psr\Log\LoggerAwareTrait

The trait LogerTrait extends LoggerAwareTrait with one method getLoger()., (*1)

Latest Stable Version License Build Status Coverage Status, (*2)

Installation

The preferred way to install this extension is through composer and then run, (*3)

composer require elementary/logger-trait

Usage

use elementary\logger\traits\LoggerGetInterface;
use elementary\logger\traits\LoggerTrait;
use Psr\Log\LoggerAwareInterface;

class Example implements LoggerGetInterface, LoggerAwareInterface
{
    use LoggerTrait;

    public function doSomeThing()
    {
        // do some thing
        $this->getLogger()->info('do some thing');
    }
}

$ex = new Example();

// In this case, the message will be sent to `\Psr\Log\NullLogger`
$ex->doSomeThing();

// Now message will be send to Graylog
$ex->setLogger(new \Gelf\Logger($publisher, $facility));
$ex->doSomeThing(); 

Testing and Code coverage

Unit Tests are located in tests directory. You can run your tests and collect coverage with the following command:, (*4)

vendor/bin/phpunit

Result of coverage will be output into the tests/output directory., (*5)

License

For license information check the LICENSE-file., (*6)

The Versions

18/03 2018

dev-master

9999999-dev

Extend \Psr\Log\LoggerAwareTrait

  Sources   Download

MIT

The Requires

 

The Development Requires

by Artiom Vendelev

18/03 2018

1.0.3

1.0.3.0

Extend \Psr\Log\LoggerAwareTrait

  Sources   Download

MIT

The Requires

 

The Development Requires

by Artiom Vendelev

18/03 2018

dev-coveralls

dev-coveralls

Extend \Psr\Log\LoggerAwareTrait

  Sources   Download

MIT

The Requires

 

The Development Requires

by Artiom Vendelev

16/03 2018

1.0.2

1.0.2.0

Extend \Psr\Log\LoggerAwareTrait

  Sources   Download

MIT

The Requires

 

The Development Requires

by Artiom Vendelev

16/03 2018

1.0.1

1.0.1.0

Extend \Psr\Log\LoggerAwareTrait

  Sources   Download

MIT

The Requires

 

The Development Requires

by Artiom Vendelev

15/03 2018

1.0.0

1.0.0.0

Extend \Psr\Log\LoggerAwareTrait

  Sources   Download

MIT

The Requires

 

by Artiom Vendelev