Skip to content

Commit

Permalink
Add better and more complete logging for Lighthouse test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
pingevt committed Jan 1, 2024
1 parent bb74c63 commit ead963b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ function ($el) {
$this->loggerFactory->get('esm:lighthouse')->debug("Attempting to Call Github Action: <pre>" . print_r([
$config->get('api_url'),
$post_data,
json_encode($post_data),
], TRUE) . "</pre>", []);

$ch = curl_init($config->get('api_url'));
Expand All @@ -172,7 +173,8 @@ function ($el) {

$this->loggerFactory->get('esm:lighthouse')->debug("Response Code: @code", ["@code" => $response_code]);

if ($errno = curl_errno($ch)) {
$errno = curl_errno($ch);
if ($errno ) {
$error_message = curl_strerror($errno);
$this->loggerFactory->get('esm:lighthouse')->error("cURL erro ({@errno}): @err", [
"@errno" => $errno,
Expand Down
2 changes: 1 addition & 1 deletion modules/esm_url_group/src/Entity/UrlGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm"
* },
* "route_provider" = {
* "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
* "html" = "Drupal\external_site_monitor\Entity\Routing\EsmRouteProvider",
* }
* },
* base_table = "url_group",
Expand Down

0 comments on commit ead963b

Please sign in to comment.