From b6165c02b9c8d3d3df948902b65005bb99777981 Mon Sep 17 00:00:00 2001 From: Bedis Nbiba Date: Tue, 9 Sep 2025 11:44:59 +0100 Subject: [PATCH] use console.warn/info where appropriate Change info to use console.info and warn function to use console.warn, this not only makes sense semantically but also in practice server side runtimes like deno write console.log to stdout, and console.warn to stderr (info goes to stdout, unfortunately?) this is important because logging to stdout can break some cli apps. --- src/shared/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/util.js b/src/shared/util.js index 729c1e698..71b140e1a 100644 --- a/src/shared/util.js +++ b/src/shared/util.js @@ -374,7 +374,7 @@ function getVerbosityLevel() { function info(msg) { if (verbosity >= VerbosityLevel.INFOS) { // eslint-disable-next-line no-console - console.log(`Info: ${msg}`); + console.info(`Info: ${msg}`); } } @@ -382,7 +382,7 @@ function info(msg) { function warn(msg) { if (verbosity >= VerbosityLevel.WARNINGS) { // eslint-disable-next-line no-console - console.log(`Warning: ${msg}`); + console.warn(`Warning: ${msg}`); } }