Skip to content

Commit

Permalink
Merge pull request #1070 from nextcloud/backport/1069/stable28
Browse files Browse the repository at this point in the history
[stable28] Lower setup check level from error/warning to warning/info
  • Loading branch information
nickvergessen authored Dec 7, 2023
2 parents 036f328 + ffc782a commit b194948
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/SetupChecks/LogErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function run(): SetupResult {
if (array_sum($count) === 0) {
return SetupResult::success($this->l10n->t('No errors in the logs since %s', $this->dateFormatter->formatDate($limit)));
} elseif ($count[self::LEVEL_ERROR] + $count[self::LEVEL_FATAL] > 0) {
return SetupResult::error(
return SetupResult::warning(
$this->l10n->n(
'%n error in the logs since %s',
'%n errors in the logs since %s',
Expand All @@ -83,7 +83,7 @@ public function run(): SetupResult {
)
);
} else {
return SetupResult::warning(
return SetupResult::info(
$this->l10n->n(
'%n warning in the logs since %s',
'%n warnings in the logs since %s'.json_encode($count),
Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/SetupChecks/LogErrorsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public function logProvider(): array {
$tooOld = (new \DateTime('1 month ago'))->format(\DateTime::ATOM);
return [
[[], 'success'],
[[['level' => 2, 'time' => $now]], 'warning'],
[[['level' => 3, 'time' => $now]], 'error'],
[[['level' => 2, 'time' => $now],['level' => 3, 'time' => $now]], 'error'],
[[['level' => 2, 'time' => $now],['level' => 3, 'time' => $tooOld]], 'warning'],
[[['level' => 2, 'time' => $now]], 'info'],
[[['level' => 3, 'time' => $now]], 'warning'],
[[['level' => 2, 'time' => $now],['level' => 3, 'time' => $now]], 'warning'],
[[['level' => 2, 'time' => $now],['level' => 3, 'time' => $tooOld]], 'info'],
[[['level' => 2, 'time' => $tooOld],['level' => 3, 'time' => $tooOld]], 'success'],
];
}
Expand Down

0 comments on commit b194948

Please sign in to comment.