for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the login-cidadao project or it's bundles.
*
* (c) Guilherme Donato <guilhermednt on github>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LoginCidadao\LogBundle\Traits;
use Psr\Log\LoggerInterface;
use Psr\Log\LoggerTrait;
trait LoggerAwareTrait
{
use LoggerTrait;
use \Psr\Log\LoggerAwareTrait;
* Logs with an arbitrary level.
* @param mixed $level
* @param string $message
* @param array $context
* @return void
protected function log($level, $message, array $context = array())
if ($this->logger instanceof LoggerInterface) {
$this->logger
Psr\Log\LoggerInterface
$this->logger->log($level, $message, $context);
}