nascentdigital / scribe

A robust and extensible Javascript logging library for the browser.
MIT License
1 stars 0 forks source link

Create a plugin for adding color when running output on a terminal. #2

Open sdedios opened 4 years ago

sdedios commented 4 years ago

It would be extremely helpful to have color logging on outputs. It would be great for some flexibility of this so that it can be used in a couple different scenarios:

  1. Simple log-level based coloring, meaning a different color for trace, debug, info, warn, and error logs.
  2. Random log based coloring, meaning a dedicated color per logger. This is what the debug library does on NodeJS and it's very helpful.

I'm not too sure of what the config / options should look like, but I am very certain this should probably be a plugin.

sdedios commented 4 years ago

Should also us the supports-color library for determining if color is supporting using Chalk in the Terminal - otherwise it should just be a no-op.