Skip to content

Commit

Permalink
Remove ILogger
Browse files Browse the repository at this point in the history
Signed-off-by: Marius David Wieschollek <[email protected]>
  • Loading branch information
marius-wieschollek committed Jan 25, 2025
1 parent 47fff41 commit 43aa28e
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/lib/Fetcher/NightlyAppFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Http\Client\IClientService;
use OCP\IConfig;
use OCP\ILogger;
use OCP\Support\Subscription\IRegistry;
use Psr\Log\LoggerInterface;
use Throwable;
Expand Down Expand Up @@ -75,23 +74,20 @@ class NightlyAppFetcher extends Fetcher {
* @param LoggerInterface $logger
*/
public function __construct(
Factory $appDataFactory,
IClientService $clientService,
ITimeFactory $timeFactory,
IConfig $config,
CompareVersion $compareVersion,
Factory $appDataFactory,
IClientService $clientService,
ITimeFactory $timeFactory,
IConfig $config,
CompareVersion $compareVersion,
LoggerInterface $logger,
IRegistry $registry
IRegistry $registry
) {

$parentLogger = $logger;

parent::__construct(
$appDataFactory,
$clientService,
$timeFactory,
$config,
$parentLogger,
$logger,
$registry
);

Expand Down Expand Up @@ -199,7 +195,7 @@ public function setVersion(string $version, string $fileName = 'apps.json', bool
*/
protected function releaseAllowedInChannel($release, $app, $allowUnstable): bool {
$isPreRelease = strpos($release['version'], '-');
$allowNightly = $allowUnstable|| $this->getChannel() === 'daily' || $app === 'passwords';
$allowNightly = $allowUnstable || $this->getChannel() === 'daily' || $app === 'passwords';
$allowPreReleases = $this->getChannel() === 'beta' || $allowNightly;

return (!$isPreRelease && !$release['isNightly']) || ($allowNightly && $release['isNightly']) || ($allowPreReleases && $isPreRelease);
Expand All @@ -216,7 +212,7 @@ protected function prepareAppDbForUpdate(): string {

return $file->getETag();
} catch(Exception $e) {
$this->logger->emergency($e, ['app' => 'nightlyAppstoreFetcher', 'level' => ILogger::WARN]);
$this->logger->emergency($e, ['app' => 'nightlyAppstoreFetcher']);

return '';
}
Expand Down

0 comments on commit 43aa28e

Please sign in to comment.