2022-06-17 17:51:59 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Psr\Log;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This Logger can be used to avoid conditional log calls.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2024-12-20 12:37:52 +01:00
|
|
|
* @param mixed[] $context
|
2022-06-17 17:51:59 +02:00
|
|
|
*
|
|
|
|
* @throws \Psr\Log\InvalidArgumentException
|
|
|
|
*/
|
2022-12-19 14:56:05 +01:00
|
|
|
public function log($level, string|\Stringable $message, array $context = []): void
|
2022-06-17 17:51:59 +02:00
|
|
|
{
|
|
|
|
// noop
|
|
|
|
}
|
|
|
|
}
|