Set the Mustache Logger instance.

@throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface

@param Mustache_Logger|Psr\Log\LoggerInterface $logger
978094
public function setLogger($logger = null)
    {
        if ($logger !== null && !($logger instanceof Mustache_Logger || is_a($logger, 'Psr\\Log\\LoggerInterface'))) {
            throw new Mustache_Exception_InvalidArgumentException('Expected an instance of Mustache_Logger or Psr\\Log\\LoggerInterface.');
        }

        if ($this->getCache()->getLogger() === null) {
            $this->getCache()->setLogger($logger);
        }

        $this->logger = $logger;
    }
1343907
public function setEventsLogLevel($eventsLogLevel)
    {
        if (!in_array($eventsLogLevel, $this->getAvailableEventsLogLevel())) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Unsupported events log level "%s". Use one of supported log levels: [%s].',
                    $eventsLogLevel,
                    implode(', ', $this->getAvailableEventsLogLevel())
                )
            );
        }

        $this->eventsLogLevel = $eventsLogLevel;
    }
473760
public function setLogLevelThreshold(string $logLevelThreshold): void
    {
        if (! array_key_exists($logLevelThreshold, $this->logLevels)) {
            throw new InvalidArgumentException('Invalid log level. Must be one of : ' . implode(', ', array_keys($this->logLevels)));
        }

        $this->logLevelThreshold = $logLevelThreshold;
    }
88948
public function log($level, $message, array $context = array())
    {
        if (!array_key_exists($level, self::$levels)) {
            throw new Mustache_Exception_InvalidArgumentException(sprintf('Unexpected logging level: %s', $level));
        }

        if (self::$levels[$level] >= self::$levels[$this->level]) {
            $this->writeLog($level, $message, $context);
        }
    }
356538
public function setLogger(GoracashLogger $logger)
    {
        $this->config->setLoggerClass(get_class($logger));
        $this->logger = $logger;
    }
1294119
public function setLogger(LoggerInterface $logger)
    {
        foreach ($this->adapters as $adapter) {
            if ($adapter instanceof LoggerAwareInterface) {
                $adapter->setLogger($logger);
            }
        }
        $this->logger = $logger;
    }
759700
public function setLogger(string $id, LoggerInterface $logger): self
    {
        $this->_loggers[$id] = $logger;

        return $this;
    }
674684
public final function setLogger( ?LoggerInterface $logger )
   {

      $this->_options[ 'logger' ] = null === $logger ? new NullLogger() : $logger;

      unset( $this->_options[ 'data' ] );

      return $this;

   }
1333951
public function setLogger(LoggerInterface $logger)
    {
        $this->logger = $logger;
        if (isset($logger)) {
            $this->parser->setLogger($logger);
            $this->nsParser->setLogger($logger);
        }
    }
1348968
public function setLogger(LoggerInterface $logger)
    {
        $this->logger = $logger;
        $this->factory->setLogger($logger);
        return $this;
    }
1362760
public function getLog(string $logger = 'default'): LoggerInterface
    {
        if (!isset($this->loggers[$logger])) {
            if ($logger === 'default') {
                if (!isset($this->implicit['logger'])) {
                    throw new \RuntimeException('The default logger was not set');
                }
                $this->loggers[$logger] = $this->implicit['logger'];
            } else {
                $this->loggers[$logger] = $this->getCollector()->getLogger($logger);
            }
        }

        return $this->loggers[$logger];
    }
19000
public function setLogger(LoggerInterface $logger)
    {
        $this->logger = $logger;

        if ($this->stream instanceof LoggerAwareInterface) {
            $this->stream->setLogger($this->getLogger());
        }

        return $this;
    }
334808
public function setLogger(
        \Psr\Log\LoggerInterface $logger = null,
        $messageFormat = \GuzzleHttp\MessageFormatter::CLF
    ) {
        if ($logger === null) {
            $handler = new \Monolog\Handler\ErrorLogHandler(\Monolog\Handler\ErrorLogHandler::SAPI);
            $handler->setFormatter(new \Monolog\Formatter\LineFormatter('%message%'));
            $logger = new \Monolog\Logger('HTTP Log', [$handler]);
        }

        $formatter = new \GuzzleHttp\MessageFormatter($messageFormat);

        $handler = \GuzzleHttp\Middleware::log($logger, $formatter);
        $this->logger = $handler;

        $handlerStack = $this->getConfig('handler');
        $this->setLogHandler($handlerStack, $handler);

        return $this;
    }
1152909
public function setLogger(\BearFramework\App\ILogger $logger): self
    {
        if ($this->logger !== null) {
            throw new \Exception('A logger is already set!');
        }
        $this->logger = $logger;
        return $this;
    }
306726
public function addLogger(LoggerInterface $logger, $level = null, $key = null) {
        // Make a small attempt to prevent infinite cycles by disallowing all logger chaining.
        if ($logger instanceof AggregateLogger) {
            throw new \InvalidArgumentException("You cannot chain AggregateLoggers.", 500);
        }

        $level = $level ?? self::DEBUG;
        $key = $key ?? spl_object_hash($logger);
        $this->loggers[$key] = [
            'logger'    => $logger,
            'priority'  => static::levelPriority($level),
            'key'       => $key,
            'enabled'   => true
        ];
        return $this;
    }
961336
public function setLogger($logger)
    {
        if (!method_exists($logger, 'info'))
        {
            throw new Exception('logger need have method "info($message)"');
        }
        if (!method_exists($logger, 'error'))
        {
            throw new Exception('logger need have method "error($message)"');
        }
        $this->logger = $logger;
    }
759907
public function setErrorsLogLevel($errorsLogLevel)
    {
        if (!in_array($errorsLogLevel, $this->getAvailableErrorsLogLevel())) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Unsupported errors log level "%s". Use one of supported log levels: [%s].',
                    $errorsLogLevel,
                    implode(', ', $this->getAvailableErrorsLogLevel())
                )
            );
        }

        $this->errorsLogLevel = $errorsLogLevel;
    }