progress-log
v1.0.3
Published
log progress in console app
Downloads
16
Readme
progress-log
For logging progress to console or log files:
- Avoid excessive logging: log only when interval time or count exceeded
- Tracks current speed (duration configurable)
- Tracks total duration and speed
- Customizable msg and log
Usage
To install
npm i progress-log
Example:
import {ProgressLogger} from "progress-log";
let logger = new ProgressLogger({});
logger.tick(3000);
logger.tick(3000);
logger.tick(3000);
logger.tick(3000); // progress logged to console since > 10000 accumulated
setTimeout( ()=>{
logger.tick(1); // progress logged to console since > 1s elapsed
, 1001)