Sets the specific PSR logging client to enable the tracking of errors.

@param  \Psr\Log\LoggerInterface $logger A PSR-3 logger.
@throws InvalidArgumentException If the logger is invalid PSR-3 client.
@return void
182184
private function setLogger($logger)
    {
        $psr = 'Psr\\Log\\LoggerInterface';
        if (!is_a($logger, $psr)) {
            throw new InvalidArgumentException(
                sprintf('Expected an instance of %s', $psr)
            );
        }

        $this->logger = $logger;
    }
275389
public function setResponseIdentifier($responseIdentifier)
    {
        if (is_string($responseIdentifier) === false || empty($responseIdentifier) === true) {
            throw new InvalidArgumentException(
                "The 'responseIdentifier' argument must be a non-empty string."
            );
        }
        
        $this->responseIdentifier = $responseIdentifier;
    }
1007078
public function setFieldIdentifier($fieldIdentifier)
    {
        if ($fieldIdentifier == '' || Format::isIdentifier($fieldIdentifier)) {
            $this->fieldIdentifier = $fieldIdentifier;
        } else {
            $msg = "'${fieldIdentifier}' is not a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
536556
public function register ($name, LoggerInterface $logger) {
    $name = Util::normalizeName($name);
    $this->logs[$name] = $logger;
  }
894770
public function setPermissions(LoggerInterface $logger)
    {
        $response = $this->client->put($this->apiUserPermissionUrl, [
            'auth' => [$this->username, $this->password],
            'json' => [
                'configure' => '.*',
                'read' => '.*',
                'write' => '.*',
            ],
        ]);

        if ($response->getStatusCode() > 200 && $response->getStatusCode() < 300) {
            $logger->info(sprintf('Permissions successfully set for %s.', $this->username));

            return true;
        }

        $logger->error(sprintf('Permission set failed: %s', print_r($response, true)));

        return false;
    }
356538
public function setLogger(GoracashLogger $logger)
    {
        $this->config->setLoggerClass(get_class($logger));
        $this->logger = $logger;
    }
854075
public static function logException (LoggerInterface $logger, Exception $exception)
  {
    $logger->error (sprintf ("%s, at %s(%s)", $exception->getMessage (),
      ErrorConsole::shortFileName ($exception->getFile ()), $exception->getLine ()));
  }
718641
def set_logger(self, logger):
        
        self.__logger = logger
        self.session.set_logger(self.__logger)
277540
public function setLogger($logger)
    {
        if ($this->logger !== null && ($this->logger instanceof LoggerInterface) === false) {
            throw new Exception\InvalidArgumentException('$logger must be an instance of \Psr\Log\LoggerInterface or null');
        }

        $this->logger = $logger;
        $this->onConfigChanged();
    }
820652
public static function create(LoggerInterface $logger, array $options = [])
    {
        $context = new \ZMQContext();
        $socket = $context->getSocket(\ZMQ::SOCKET_REQ);
        $socket->setSockOpt(\ZMQ::SOCKOPT_LINGER, $options['linger']);
        $socket->connect(sprintf(
            '%s://%s:%s', $options['protocol'], $options['host'], $options['port']
        ));

        return new static($socket, $logger);
    }
379205
public function setLogger($logger)
    {
        $this->logger = $logger;
        $this->connection->getConfiguration()->setSQLLogger($this->logger);
        return $this;
    }
1107206
public function setLogger(Logger $logger, $verbosity = 0, $paranoid = true)
    {
        $this->logger = $logger;
        if ($paranoid) {
            register_shutdown_function(array($this, 'endOfScript'));
        }
        set_error_handler(array($this, 'errorHandler'));
        set_exception_handler(array($this, 'exceptionHandler'));

        if ($verbosity == OutputInterface::VERBOSITY_VERBOSE) {
            $logger->pushHandler(
                new StreamHandler(fopen('php://stdout', 'w'), Logger::DEBUG, false)
            );
            $logger->pushProcessor(new MemoryUsageProcessor);
            $logger->pushProcessor(new MemoryPeakUsageProcessor);
        }
        if ($verbosity == OutputInterface::VERBOSITY_NORMAL) {
            $logger->pushHandler(
                new StreamHandler(fopen('php://stdout', 'w'), Logger::INFO, false)
            );
        }
        $logger->pushHandler(new StreamHandler(fopen('php://stderr', 'w'), Logger::WARNING));
    }
791086
public function setLogger(LoggerInterface $logger)
	{
		$this->logger = $logger;

		// Also update the logger on all current gateways in our pool
		foreach ($this->gatewayPool as $gateway) {
			$gateway->setLogger($logger);
		}
	}
463770
public function setLogDir($logDir)
    {
        $logDir = trim($logDir);
        if (!file_exists($logDir) || !is_writable($logDir)) {
            throw new \InvalidArgumentException("Invalid log directory!");
        }

        $this->_logDir = $logDir;
    }
674684
public final function setLogger( ?LoggerInterface $logger )
   {

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

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

      return $this;

   }
1172228
public function setLogger(AuthAbstract $logger)
  {
    $this->config->setLoggerClass(get_class($logger));
    $this->logger = $logger;
  }
756722
public function add_logger(base_logger $logger) {
        $existing = $this->logger;
        while ($existing->get_next()) {
            $existing = $existing->get_next();
        }
        $existing->set_next($logger);
    }