29 lines
651 B
PHP
Raw Normal View History

2016-11-28 21:52:15 -08:00
<?php
namespace Psr\Log;
/**
2018-01-26 15:50:15 +01:00
* This Logger can be used to avoid conditional log calls.
2016-11-28 21:52:15 -08:00
*
* Logging should always be optional, and if no logger is provided to your
* library creating a NullLogger instance to have something to throw logs at
* is a good way to avoid littering your code with `if ($this->logger) { }`
* blocks.
*/
class NullLogger extends AbstractLogger
{
/**
* Logs with an arbitrary level.
*
2018-01-26 15:50:15 +01:00
* @param mixed $level
2016-11-28 21:52:15 -08:00
* @param string $message
2018-01-26 15:50:15 +01:00
* @param array $context
*
* @return void
2016-11-28 21:52:15 -08:00
*/
public function log($level, $message, array $context = array())
{
// noop
}
}