for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kuleuven\AuthenticationBundle\Traits;
use Psr\Log\LoggerInterface;
trait LoggerTrait
{
/**
* @var LoggerInterface
*/
protected $logger;
* @param LoggerInterface $logger
* @return $this
public function setLogger(LoggerInterface $logger)
$this->logger = $logger;
return $this;
}
* @param string $message
* @param string $type
protected function log($message, $type = 'info')
if (null !== $this->logger) {
$this->logger->$type($message);