diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-08-20 15:14:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-20 15:14:37 -0400 |
commit | a7c002ae634b20a2f84c90417327a88c9ac2df99 (patch) | |
tree | c21a179412ee70f59eb0c38acfbe5d4998870224 /ext/http | |
parent | 2f47b4d1fd8e37a5e45bc1b8f3623708e0f95e2e (diff) |
chore: enable no-console dlint rule (#25113)
Diffstat (limited to 'ext/http')
-rw-r--r-- | ext/http/00_serve.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index 9c6f80552..02910d580 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -525,6 +525,7 @@ function mapToCallback(context, callback, onError) { ); } } catch (error) { + // deno-lint-ignore no-console console.error("Exception in onError while handling exception", error); response = internalServerError(); } @@ -533,6 +534,7 @@ function mapToCallback(context, callback, onError) { if (innerRequest?.[_upgraded]) { // We're done here as the connection has been upgraded during the callback and no longer requires servicing. if (response !== UPGRADE_RESPONSE_SENTINEL) { + // deno-lint-ignore no-console console.error("Upgrade response was not returned from callback"); context.close(); } @@ -612,6 +614,7 @@ function serve(arg1, arg2) { const wantsUnix = ObjectHasOwn(options, "path"); const signal = options.signal; const onError = options.onError ?? function (error) { + // deno-lint-ignore no-console console.error(error); return internalServerError(); }; @@ -627,6 +630,7 @@ function serve(arg1, arg2) { if (options.onListen) { options.onListen(listener.addr); } else { + // deno-lint-ignore no-console console.log(`Listening on ${path}`); } }); @@ -684,6 +688,7 @@ function serve(arg1, arg2) { const host = StringPrototypeIncludes(addr.hostname, ":") ? `[${addr.hostname}]` : addr.hostname; + // deno-lint-ignore no-console console.log(`Listening on ${scheme}${host}:${addr.port}/`); } }; @@ -729,6 +734,7 @@ function serveHttpOn(context, addr, callback) { const promiseErrorHandler = (error) => { // Abnormal exit + // deno-lint-ignore no-console console.error( "Terminating Deno.serve loop due to unexpected error", error, @@ -856,6 +862,7 @@ function registerDeclarativeServer(exports) { const nThreads = serveWorkerCount > 1 ? ` with ${serveWorkerCount} threads` : ""; + // deno-lint-ignore no-console console.debug( `%cdeno serve%c: Listening on %chttp://${hostname}:${port}/%c${nThreads}`, "color: green", |