2017 © Pedro Peláez
 

library psr-log-extension

An extension to the Psr\Log package

image

enrise/psr-log-extension

An extension to the Psr\Log package

  • Sunday, April 12, 2015
  • by rtuin
  • Repository
  • 7 Watchers
  • 1 Stars
  • 5,084 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Archived and unmaintained

This is an old repository that is no longer used or maintained. We advice to no longer use this repository., (*1)

Original README can be found below:

Enrise Psr\Log extension

Latest Stable Version License, (*2)

This repository contains an extension on the LoggerAwareTrait that comes with the Psr\Log package. It contains convenience methods to use the LoggerAwareInterface implementation in a safe way. Meaning you don't have to care whether the class you're implementing actually has a logger instance attached to it., (*3)

Usage example

The example below works whether a logger instance has been attached or not., (*4)

use Psr\Log\LoggerAwareInterface;
use Enrise\Log\LoggerAwareTrait;

class Foo implements LoggerAwareInterface
{
    use LoggerAwareTrait;

    function bar()
    {
        $this->logDebug('Write a debug statement to the log');
    }
}

$foo = new Foo();
$foo->bar(); // All fine

$foo->setLogger(new ConcreteLogger());
$foo->bar(); // Writes to the logger as usual

Credits

License

The MIT License (MIT). Please see License File for more information., (*5)

The Versions

12/04 2015

dev-master

9999999-dev

An extension to the Psr\Log package

  Sources   Download

MIT

The Requires

 

The Development Requires

16/03 2015

1.0.1

1.0.1.0

An extension to the Psr\Log package

  Sources   Download

MIT

The Requires

 

The Development Requires

13/03 2015

1.0.0

1.0.0.0

An extension to the Psr\Log package

  Sources   Download

MIT

The Requires