4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Debug;
14 use Psr\Log\AbstractLogger;
17 * A buffering logger that stacks logs for later.
19 * @author Nicolas Grekas <p@tchwork.com>
21 class BufferingLogger extends AbstractLogger
23 private $logs = array();
25 public function log($level, $message, array $context = array())
27 $this->logs[] = array($level, $message, $context);
30 public function cleanLogs()
33 $this->logs = array();