PHP code example of michaelmoussa / zend-psr-log
1. Go to this page and download the library: Download michaelmoussa/zend-psr-log library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
michaelmoussa / zend-psr-log example snippets
return [
'modules' => [
...,
'ZendPsrLog',
...
],
...
];
use Psr\Log\LoggerInterface;
class Foo
{
public function __construct(LoggerInterface $logger) { ... }
}
/** @var \ZendPsrLog\Logger $logger */
$logger = $serviceManager->get('Zend\Log\Logger');
$foo = new Foo($logger->getPsrLogger());