console.info for level "info"

pull/910/head
Andreas Brett 3 years ago
parent e5913c5abc
commit df36a4bb3c

@ -50,7 +50,7 @@ function log(module, msg, level) {
var now = new Date().toISOString(); var now = new Date().toISOString();
var formattedMessage = (typeof msg === "string") ? now + " [" + module + "] " + level + ": " + msg : msg; var formattedMessage = (typeof msg === "string") ? now + " [" + module + "] " + level + ": " + msg : msg;
if (level === "INFO") { if (level === "INFO") {
console.log(formattedMessage); console.info(formattedMessage);
} }
else if (level === "WARN") { else if (level === "WARN") {
console.warn(formattedMessage); console.warn(formattedMessage);

@ -57,7 +57,7 @@ function log(module: string, msg: any, level:string) {
const formattedMessage = (typeof msg === "string") ? `${now} [${module}] ${level}: ${msg}` : msg; const formattedMessage = (typeof msg === "string") ? `${now} [${module}] ${level}: ${msg}` : msg;
if (level === "INFO") { if (level === "INFO") {
console.log(formattedMessage); console.info(formattedMessage);
} else if (level === "WARN") { } else if (level === "WARN") {
console.warn(formattedMessage); console.warn(formattedMessage);
} else if (level === "ERROR") { } else if (level === "ERROR") {

Loading…
Cancel
Save