How to use the lighthouse-logger.err function in lighthouse-logger

To help you get started, we’ve selected a few lighthouse-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GoogleChrome / lighthouse / lighthouse-cli / performance-experiment / server.js View on Github external
if (pathname === '/rerun') {
        rerunRequestHandler(request, response);
      } else {
        throw new HTTPError(404);
      }
    } else {
      throw new HTTPError(405);
    }
  } catch (err) {
    if (err instanceof HTTPError) {
      response.writeHead(err.statusCode);
      response.end(err.message || http.STATUS_CODES[err.statusCode]);
    } else {
      response.writeHead(500);
      response.end(http.STATUS_CODES[500]);
      log.err('PerformanceXServer', err.code, err);
    }
  }
}