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:
parent
5b7f9ca8b9
commit
b6165c02b9
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user