2017 © Pedro Peláez
 

library log

Common interface for logging libraries

image

psr/log

Common interface for logging libraries

  • Monday, October 10, 2016
  • by Seldaek
  • Repository
  • 72 Watchers
  • 1473 Stars
  • 96,297,329 Installations
  • PHP
  • 3130 Dependents
  • 81 Suggesters
  • 109 Forks
  • 10 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

PSR Log

This repository holds all interfaces/classes/traits related to PSR-3., (*1)

Note that this is not a logger of its own. It is merely an interface that describes a logger. See the specification for more details., (*2)

Usage

If you need a logger, you can use the interface like this:, (*3)

<?php

use Psr\Log\LoggerInterface;

class Foo
{
    private $logger;

    public function __construct(LoggerInterface $logger = null)
    {
        $this->logger = $logger;
    }

    public function doSomething()
    {
        if ($this->logger) {
            $this->logger->info('Doing work');
        }

        // do something useful
    }
}

You can then pick one of the implementations of the interface to get a logger., (*4)

If you want to implement the interface, you can require this package and implement Psr\Log\LoggerInterface in your code. Please read the specification text for details., (*5)

The Versions

10/10 2016

dev-master

9999999-dev https://github.com/php-fig/log

Common interface for logging libraries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

psr-3 psr log

10/10 2016

1.0.2

1.0.2.0 https://github.com/php-fig/log

Common interface for logging libraries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

psr-3 psr log

19/09 2016

1.0.1

1.0.1.0 https://github.com/php-fig/log

Common interface for logging libraries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

psr-3 psr log

21/12 2012

1.0.0

1.0.0.0

Common interface for logging libraries

  Sources   Download

MIT

psr-3 psr log

We request your permission to obtain statistical data of your navigation on this website, in compliance with Royal Decree-Law 13/2012 (Spain). If you continue browsing, we consider that you accept the use of cookies. OK | More information