src/LoggerTrait.php
public function log($level, $message, array $context = []): void
    {
        if ($this->logger === null) {
            $this->logger = new NullLogger();
        }
        $this->logger->log($level, $message, $context);
    }
public function log($level, $message, array $context = []): void
    {
        if ($this->logger === null) {
            $this->logger = new NullLogger();
        }
        $this->logger->log($level, $message, $context);
    }
Logs with an arbitrary level.

@param mixed   $level
@param string  $message
@param mixed[] $context