log-with-statusbar
Version:
A light weight logger with a status bar on the bottom or the top that does not disappear with scrolling
30 lines (23 loc) • 530 B
JavaScript
const log = require("../index.js")({
ololog_configure: {
locate: false,
tag: true
}
});
let i = 0;
let maxCount = 20;
setInterval(() => {
var date = new Date();
log(date);
log.info(`Hi this is log line ${i++}`);
log.info(`Here is another log line ${i}`);
log.info(`-----------------------------------------------------------------`);
if(i<5){
log.setStatusBarText([`Complete!`]);
} else{
log.setStatusBarText([`Progressing: ${(i)}`]);
}
if (i == maxCount) {
i = 0;
}
}, 100);