Skip to content

Commit b6165c0

Browse files
committed
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.
1 parent 5b7f9ca commit b6165c0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/shared/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,15 +374,15 @@ function getVerbosityLevel() {
374374
function info(msg) {
375375
if (verbosity >= VerbosityLevel.INFOS) {
376376
// eslint-disable-next-line no-console
377-
console.log(`Info: ${msg}`);
377+
console.info(`Info: ${msg}`);
378378
}
379379
}
380380

381381
// Non-fatal warnings.
382382
function warn(msg) {
383383
if (verbosity >= VerbosityLevel.WARNINGS) {
384384
// eslint-disable-next-line no-console
385-
console.log(`Warning: ${msg}`);
385+
console.warn(`Warning: ${msg}`);
386386
}
387387
}
388388

0 commit comments

Comments
 (0)