From 597f2d8d4d9b91ee586b9787d6ba52d247e4ff87 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Sat, 14 Sep 2024 23:30:06 +0200 Subject: feat: print `Listening on` messages on stderr instead of stdout (#25491) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/denoland/deno/issues/25114 --------- Signed-off-by: Leo Kettmeir Co-authored-by: Bartek IwaƄczuk Co-authored-by: crowlkats Co-authored-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> --- ext/http/00_serve.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index a49ab2790..87798656f 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -646,7 +646,7 @@ function serve(arg1, arg2) { options.onListen(listener.addr); } else { // deno-lint-ignore no-console - console.log(`Listening on ${path}`); + console.error(`Listening on ${path}`); } }); } @@ -695,7 +695,7 @@ function serve(arg1, arg2) { const host = formatHostName(addr.hostname); // deno-lint-ignore no-console - console.log(`Listening on ${scheme}${host}:${addr.port}/`); + console.error(`Listening on ${scheme}${host}:${addr.port}/`); } }; @@ -871,7 +871,7 @@ function registerDeclarativeServer(exports) { const host = formatHostName(hostname); // deno-lint-ignore no-console - console.debug( + console.error( `%cdeno serve%c: Listening on %chttp://${host}:${port}/%c${nThreads}`, "color: green", "color: inherit", -- cgit v1.2.3