0

I'd like to get a very special console output for my node.js console...

I'd like to highlight just specific words e.g. ('ERROR', 'SUCCESS', ...) in specific colors (red,green,...).

Is there an easy way to achieve this or do I have to check the console output every time & test if the output includes my word ('error') to laterone color it??

BTW thats how I've catched the console output:

console.log = function(d) {
  process.stdout.write(d + '\n'); 
}

Thanks in advance :)

0 Answers0