Console++ - enhance your console

  • npm • console • log • phantomjs • javascript • nodejs • colours • library • enhance • level • ghostdriver • console++
  • 139 words

I need a logger for GhostDriver but I’m too lazy to figure out how to use a nice, proper logging library. Plus I’m a BIG fun of old-school-debugging: I just substituted all the printf() calls with console.log.

So I decide to make every JavaScript developer shiver in disgust and wrote a small library that enhances the global console object.

This tiny library is called Console++ and works with NodeJS, PhantomJS and any decent JavaScript runtime.

It does output colouring, adds timestamps and log level to the lines, and can be used to redirect the output to other media than the console (just register a callback). On node, just type npm install consoleplusplus to get started.

It’s so simple that the README is more than enough to use it.

It’s under BSD license, so you can have fun with it.