EmptyLogger.php 801 B

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