for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the `liip/LiipImagineBundle` project.
*
* (c) https://github.com/liip/LiipImagineBundle/graphs/contributors
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace Liip\ImagineBundle\Log;
use Psr\Log\AbstractLogger;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
/**
* @author Rob Frawley 2nd <[email protected]>
class Logger extends AbstractLogger implements LoggerInterface
{
* @var LoggerInterface
private $logger;
* @param LoggerInterface|null $logger
public function __construct(LoggerInterface $logger = null)
$this->logger = $logger ?: new NullLogger();
}
* @param mixed $level
* @param string $message
* @param array $context
public function log($level, $message, array $context = [])
$this->logger->log($level, $message, $context);