Skip to content

Commit a9cf5f8

Browse files
authored
Merge pull request #1069 from nextcloud/fix/lower-setupcheck-severity
Lower setup check level from error/warning to warning/info
2 parents c425041 + 1444fec commit a9cf5f8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/SetupChecks/LogErrors.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function run(): SetupResult {
7474
if (array_sum($count) === 0) {
7575
return SetupResult::success($this->l10n->t('No errors in the logs since %s', $this->dateFormatter->formatDate($limit)));
7676
} elseif ($count[self::LEVEL_ERROR] + $count[self::LEVEL_FATAL] > 0) {
77-
return SetupResult::error(
77+
return SetupResult::warning(
7878
$this->l10n->n(
7979
'%n error in the logs since %s',
8080
'%n errors in the logs since %s',
@@ -83,7 +83,7 @@ public function run(): SetupResult {
8383
)
8484
);
8585
} else {
86-
return SetupResult::warning(
86+
return SetupResult::info(
8787
$this->l10n->n(
8888
'%n warning in the logs since %s',
8989
'%n warnings in the logs since %s'.json_encode($count),

tests/Unit/SetupChecks/LogErrorsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public function logProvider(): array {
6060
$tooOld = (new \DateTime('1 month ago'))->format(\DateTime::ATOM);
6161
return [
6262
[[], 'success'],
63-
[[['level' => 2, 'time' => $now]], 'warning'],
64-
[[['level' => 3, 'time' => $now]], 'error'],
65-
[[['level' => 2, 'time' => $now],['level' => 3, 'time' => $now]], 'error'],
66-
[[['level' => 2, 'time' => $now],['level' => 3, 'time' => $tooOld]], 'warning'],
63+
[[['level' => 2, 'time' => $now]], 'info'],
64+
[[['level' => 3, 'time' => $now]], 'warning'],
65+
[[['level' => 2, 'time' => $now],['level' => 3, 'time' => $now]], 'warning'],
66+
[[['level' => 2, 'time' => $now],['level' => 3, 'time' => $tooOld]], 'info'],
6767
[[['level' => 2, 'time' => $tooOld],['level' => 3, 'time' => $tooOld]], 'success'],
6868
];
6969
}

0 commit comments

Comments
 (0)