Although this does not solve the problem of the template system, it can help you achieve what you are trying to achieve. There are two different modules that I would suggest you look at:
chalk - "Styling a terminal line done correctly. Lots of color."
There is a node module called chalk that allows you to define colors / styles, albeit a very simple api.
It is compatible with sprintf substitution and can be combined with console.log to write pretty colored formatted output.
bunyan - "JSON logging library for node.js services"
If you want to use it for magazines , I would suggest looking at bunyan. This allows you to basically send something to your JSON formatted logs. It adds additional data, such as timestamps and error levels, so you don't need to. The output is just JSON, so it can be easily programmed.
By connecting std.out to bunyan , it will color and format the output, making it easier to verify.
source share