Skip to content

Commit e1594f3

Browse files
committed
feat: warn on invalid link
Instead of logging at the info level, warn when the link is unreachable.
1 parent c50b433 commit e1594f3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Parser/UrlCache.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ private function updateUrl(string $url): void
114114
if ($urlHeader !== false) {
115115
$response = $urlHeader[0];
116116
$valid = $this->isValidResponse($response);
117-
Mesamatrix::$logger->info("Try URL \"{$url}\": " . ($valid ? "valid" : "invalid") . " (\"{$response}\")");
117+
if ($valid) {
118+
Mesamatrix::$logger->info("URL \"{$url}\" is valid");
119+
}
120+
else {
121+
Mesamatrix::$logger->warning("URL \"{$url}\" is invalid");
122+
}
118123
}
119124

120125
// Register URL's validity.

0 commit comments

Comments
 (0)