this might be an easy question for you but I am struggling with it. I want to catch the events thrown by the npmlog library as described here: https://www.npmjs.com/package/npmlog
How do I create an event listener on those? There is no .on() function neither can I create an instance of log beforehand.
import * as log from 'npmlog';
log.error('problem', 'some message');
// What I would like to do:
log.on("error", ()=>{do something})
Thank you very much for your help!