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.
This commit is contained in:
Bedis Nbiba 2025-09-09 11:44:59 +01:00 committed by sigmaSd
parent 5b7f9ca8b9
commit b6165c02b9

View File

@ -374,7 +374,7 @@ function getVerbosityLevel() {
function info(msg) { function info(msg) {
if (verbosity >= VerbosityLevel.INFOS) { if (verbosity >= VerbosityLevel.INFOS) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(`Info: ${msg}`); console.info(`Info: ${msg}`);
} }
} }
@ -382,7 +382,7 @@ function info(msg) {
function warn(msg) { function warn(msg) {
if (verbosity >= VerbosityLevel.WARNINGS) { if (verbosity >= VerbosityLevel.WARNINGS) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(`Warning: ${msg}`); console.warn(`Warning: ${msg}`);
} }
} }