logging.

@deprecated Overwriting Client->_log is deprecated. Handle logging functionality by using a custom LoggerInterface.

@param mixed $context
190131
protected function _log($context)
    {
        if ($context instanceof ConnectionException) {
            $this->_logger->error('Elastica Request Failure', [
                'exception' => $context,
                'request' => $context->getRequest()->toArray(),
                'retry' => $this->hasConnection(),
            ]);

            return;
        }

        if ($context instanceof Request) {
            $this->_logger->debug('Elastica Request', [
                'request' => $context->toArray(),
                'response' => $this->_lastResponse ? $this->_lastResponse->getData() : null,
                'responseStatus' => $this->_lastResponse ? $this->_lastResponse->getStatus() : null,
            ]);

            return;
        }

        $this->_logger->debug('Elastica Request', [
            'message' => $context,
        ]);
    }
496304
public static function getLogger(array $context = array())
    {
        $str = \Wedeto\Util\Functions::str($context);
        if (self::$logger_factory === null)
            return new NullLogger();

        return self::$logger_factory->get(array($context['class'] ?? "Wedeto.UndefinedLogger"));
    }
1057416
public function log($level, $message, array $context = array()) {
		try {
			call_user_func($this->callable, $level, $message, $context);
		} catch(\Exception $e) {
		}
	}
1276640
public function debug($message, array $context = array()) {
        $context['fromClass'] = get_called_class();
        foreach ($this->loggersInstances as $logger) {
            $logger->debug($message, $context);
        }
    }
1035844
public function logger($instance = null)
    {
        deprecationWarning(
            'Connection::logger() is deprecated. ' .
            'Use Connection::setLogger()/getLogger() instead.'
        );
        if ($instance === null) {
            return $this->getLogger();
        }

        $this->setLogger($instance);
    }
641480
protected function logInfo(string $message, array $context = []): void
    {
        if ($this->logger !== null) {
            $this->logger->info($message, $context);
        }
    }
394467
private function parseContext($context)
    {
        $debugBackTrace = debug_backtrace();
        if(!isset($context['trace']))
        {
            $context['trace'] = $this->getTrace($debugBackTrace);
        }
        if(!isset($context['errorFile']))
        {
            list($file, $line) = $this->getErrorFile($debugBackTrace);
            $context['errorFile'] = $file;
            $context['errorLine'] = $line;
        }
        return $context;
    }
16077
public function log($level, $message, array $context = array()) {
		$fn = $this->callback;
		$fn($level, $message, $context);
		$this->logger()->log($level, $message, $context);
	}
162283
public function log($message, $context = "[Strata]")
    {
        $logger = $this->getLogger();
        if (!is_null($logger)) {
            $logger->log($message, $context);
        }
    }
113694
public function debug($value, array $context = array())
	{
		// If we were given anything other than a string,
		// we'll get readable format of the value.
		if( ! is_string($value))
		{
			$value = print_r($value, true);
		}

		$this->log(LogLevel::DEBUG, $value, $context);
	}
250457
static public function log($level, $message, array $context = array())
    {
        self::getDefaultLogger()->log($level, $message, $context);
    }
1360766
public function log($level, $message, array $context = array())
  {
    $this->Web2All->debugLog('['.$level.'] '.$this->interpolate($message, $context));
  }
1316633
public function log($level, $message, array $context = []): void
    {
        $this->{$level}[] = $this->interpolate($message, $context);
    }
449277
public function log($level, $message, array $context = array()) {
		$result = preg_match(sprintf("/%s/%s", preg_quote($this->pattern, '/'), $this->modifiers), $message);
		if(!$result !== $this->negate) {
			$this->logger()->log($level, $message, $context);
		}
	}
1138516
public function debug($message, array $context = [])
    {
        if ($this->logger instanceof LoggerInterface) {
            $this->logger->debug($message, $context);
        }
    }
1351155
public function log($level, $message, array $context = []) : void
    {
        $prefix = '';

        if ($this->timestamps) {
            $prefix .= '[' . date(self::TIMESTAMP_FORMAT) . '] ';
        }

        $prefix .= $this->channel . '.' . strtoupper((string) $level) . ': ';

        echo $prefix . $message . PHP_EOL;
    }
903001
public function log($level, $message, array $context = [])
    {
        // convert level to syslog level
        $syslogPriority = self::levelToPriority($level);

        syslog(
            $syslogPriority,
            $message
        );
    }