Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logger.writeConsole = function writeConsole(level, module, args) {
const name = Logger.levelsByVal[level];
const msg = this.fmt(args, false);
if (++scrollback > 1000) {
log.innerHTML = '';
scrollback = 1;
}
const now = Math.floor(Date.now() / 1000);
log.innerHTML += `<span style="color:blue;">${now}</span> `;
if (name === 'error') {
log.innerHTML += `<span style="color:red;">[${name}] `;
if (module)
log.innerHTML += `(${module}) `;
log.innerHTML += '</span>';