use OCP\Http\Client\IClientService;
use OCP\IConfig;
use OCP\IL10N;
+use OCP\ILogger;
use OCP\IRequest;
use OC_Util;
use OCP\IURLGenerator;
private $l10n;
/** @var Checker */
private $checker;
+ /** @var ILogger */
+ private $logger;
/**
* @param string $AppName
* @param \OC_Util $util
* @param IL10N $l10n
* @param Checker $checker
+ * @param ILogger $logger
*/
public function __construct($AppName,
IRequest $request,
IURLGenerator $urlGenerator,
\OC_Util $util,
IL10N $l10n,
- Checker $checker) {
+ Checker $checker,
+ ILogger $logger) {
parent::__construct($AppName, $request);
$this->config = $config;
$this->clientService = $clientService;
$this->urlGenerator = $urlGenerator;
$this->l10n = $l10n;
$this->checker = $checker;
+ $this->logger = $logger;
}
/**
$client->get($httpSiteName);
$client->get($httpsSiteName);
} catch (\Exception $e) {
+ $this->logger->logException($e, ['app' => 'internet_connection_check']);
return false;
}
return true;