Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
msg += message;
// tslint:disable-next-line:no-console
console.log(msg);
}
// And entry to list
this.entries.push({
description: message,
entryNumber: this.counter + (segmentNumber > 1 ? `.${segmentNumber}` : ""),
level: LogLevel[level],
lineNumber: lineNumber.padEnd(20, " "),
timestamp,
});
// Add entry to SFDX logger
Logger.root().then((logger: Logger) => {
switch (level) {
case LogLevel.TRACE:
logger.trace("[" + lineNumber + "][" + timestamp + "]: " + message);
break;
case LogLevel.DEBUG:
logger.trace("[" + lineNumber + "][" + timestamp + "]: " + message);
break;
case LogLevel.INFO:
logger.info("[" + lineNumber + "][" + timestamp + "]: " + message);
break;
case LogLevel.WARN:
logger.warn("[" + lineNumber + "][" + timestamp + "]: " + message);
break;
case LogLevel.ERROR:
logger.error("[" + lineNumber + "][" + timestamp + "]: " + message);
break;