summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/cron/01_cron.ts1
-rw-r--r--ext/http/00_serve.ts7
-rw-r--r--ext/kv/01_db.ts1
-rw-r--r--ext/node/polyfills/_utils.ts1
-rw-r--r--ext/node/polyfills/http.ts1
-rw-r--r--ext/node/polyfills/http2.ts4
-rw-r--r--ext/node/polyfills/internal/util/debuglog.ts2
-rw-r--r--ext/node/polyfills/testing.ts1
-rw-r--r--ext/node/polyfills/util.ts1
-rw-r--r--ext/node/polyfills/worker_threads.ts2
-rw-r--r--ext/web/06_streams.js1
11 files changed, 21 insertions, 1 deletions
diff --git a/ext/cron/01_cron.ts b/ext/cron/01_cron.ts
index 7592e75ef..017da8ae2 100644
--- a/ext/cron/01_cron.ts
+++ b/ext/cron/01_cron.ts
@@ -157,6 +157,7 @@ function cron(
const _res = isPromise(result) ? (await result) : result;
success = true;
} catch (error) {
+ // deno-lint-ignore no-console
console.error(`Exception in cron handler ${name}`, error);
success = false;
}
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",
diff --git a/ext/kv/01_db.ts b/ext/kv/01_db.ts
index 9aa2036dd..418ce3ff2 100644
--- a/ext/kv/01_db.ts
+++ b/ext/kv/01_db.ts
@@ -318,6 +318,7 @@ class Kv {
const _res = isPromise(result) ? (await result) : result;
success = true;
} catch (error) {
+ // deno-lint-ignore no-console
console.error("Exception in queue handler", error);
} finally {
const promise: Promise<void> = op_kv_finish_dequeued_message(
diff --git a/ext/node/polyfills/_utils.ts b/ext/node/polyfills/_utils.ts
index 78b9bdddc..b50c113e1 100644
--- a/ext/node/polyfills/_utils.ts
+++ b/ext/node/polyfills/_utils.ts
@@ -42,6 +42,7 @@ export function warnNotImplemented(msg?: string) {
const message = msg
? `Warning: Not implemented: ${msg}`
: "Warning: Not implemented";
+ // deno-lint-ignore no-console
console.warn(message);
}
diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts
index 920f3a5b0..76291490e 100644
--- a/ext/node/polyfills/http.ts
+++ b/ext/node/polyfills/http.ts
@@ -1836,6 +1836,7 @@ export class ServerImpl extends EventEmitter {
}
setTimeout() {
+ // deno-lint-ignore no-console
console.error("Not implemented: Server.setTimeout()");
}
diff --git a/ext/node/polyfills/http2.ts b/ext/node/polyfills/http2.ts
index baa2c6e21..98edf40f4 100644
--- a/ext/node/polyfills/http2.ts
+++ b/ext/node/polyfills/http2.ts
@@ -127,6 +127,7 @@ type Http2Headers = Record<string, string | string[]>;
const debugHttp2Enabled = false;
function debugHttp2(...args) {
if (debugHttp2Enabled) {
+ // deno-lint-ignore no-console
console.log(...args);
}
}
@@ -1636,16 +1637,19 @@ export class Http2Server extends Server {
this.emit("stream", stream, headers);
return await stream._deferred.promise;
} catch (e) {
+ // deno-lint-ignore no-console
console.log(">>> Error in serveHttpOnConnection", e);
}
return new Response("");
},
() => {
+ // deno-lint-ignore no-console
console.log(">>> error");
},
() => {},
);
} catch (e) {
+ // deno-lint-ignore no-console
console.log(">>> Error in Http2Server", e);
}
},
diff --git a/ext/node/polyfills/internal/util/debuglog.ts b/ext/node/polyfills/internal/util/debuglog.ts
index 9bbaed606..bbaba7b6f 100644
--- a/ext/node/polyfills/internal/util/debuglog.ts
+++ b/ext/node/polyfills/internal/util/debuglog.ts
@@ -30,6 +30,7 @@ export function initializeDebugEnv(debugEnv: string) {
// NODE_DEBUG=http or NODE_DEBUG=http2.
function emitWarningIfNeeded(set: string) {
if ("HTTP" === set || "HTTP2" === set) {
+ // deno-lint-ignore no-console
console.warn(
"Setting the NODE_DEBUG environment variable " +
"to '" + set.toLowerCase() + "' can expose sensitive " +
@@ -50,6 +51,7 @@ function debuglogImpl(
emitWarningIfNeeded(set);
debugImpls[set] = function debug(...args: unknown[]) {
const msg = args.map((arg) => inspect(arg)).join(" ");
+ // deno-lint-ignore no-console
console.error("%s %s: %s", set, String(Deno.pid), msg);
};
} else {
diff --git a/ext/node/polyfills/testing.ts b/ext/node/polyfills/testing.ts
index 92900e632..901c38ed3 100644
--- a/ext/node/polyfills/testing.ts
+++ b/ext/node/polyfills/testing.ts
@@ -28,6 +28,7 @@ class NodeTestContext {
}
diagnostic(message) {
+ // deno-lint-ignore no-console
console.log("DIAGNOSTIC:", message);
}
diff --git a/ext/node/polyfills/util.ts b/ext/node/polyfills/util.ts
index eee171ccf..cb4e6498a 100644
--- a/ext/node/polyfills/util.ts
+++ b/ext/node/polyfills/util.ts
@@ -234,6 +234,7 @@ function timestamp(): string {
*/
// deno-lint-ignore no-explicit-any
export function log(...args: any[]) {
+ // deno-lint-ignore no-console
console.log("%s - %s", timestamp(), ReflectApply(format, undefined, args));
}
diff --git a/ext/node/polyfills/worker_threads.ts b/ext/node/polyfills/worker_threads.ts
index 3519ae217..eaabe9cd7 100644
--- a/ext/node/polyfills/worker_threads.ts
+++ b/ext/node/polyfills/worker_threads.ts
@@ -47,7 +47,7 @@ const {
const debugWorkerThreads = false;
function debugWT(...args) {
if (debugWorkerThreads) {
- // deno-lint-ignore prefer-primordials
+ // deno-lint-ignore prefer-primordials no-console
console.log(...args);
}
}
diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js
index ea3a3110f..69d333c0d 100644
--- a/ext/web/06_streams.js
+++ b/ext/web/06_streams.js
@@ -164,6 +164,7 @@ function resolvePromiseWith(value) {
function rethrowAssertionErrorRejection(e) {
if (e && ObjectPrototypeIsPrototypeOf(AssertionError.prototype, e)) {
queueMicrotask(() => {
+ // deno-lint-ignore no-console
console.error(`Internal Error: ${e.stack}`);
});
}