1<?php 2 3declare(strict_types = 1); 4 5namespace Elasticsearch\Common; 6 7use Psr\Log\AbstractLogger; 8use Psr\Log\LoggerInterface; 9 10/** 11 * Class EmptyLogger 12 * 13 * Logger that doesn't do anything. Similar to Monolog's NullHandler, 14 * but avoids the overhead of partially loading Monolog 15 * 16 * @category Elasticsearch 17 * @package Elasticsearch\Common 18 * @author Zachary Tong <zach@elastic.co> 19 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 20 * @link http://elastic.co 21 */ 22class EmptyLogger extends AbstractLogger implements LoggerInterface 23{ 24 /** 25 * {@inheritDoc} 26 */ 27 public function log($level, $message, array $context = []) 28 { 29 return; 30 } 31} 32