gruntjs / grunt-legacy-log

The Grunt logger.
MIT License
5 stars 19 forks source link

making >> optional in output #13

Closed HolgerJeromin closed 8 years ago

HolgerJeromin commented 8 years ago

This adds a new option named greaterSigns (defaults to true, so no change of behaviour).

Successfully tested with the command line parameter --no-greaterSigns

fixes #5

shama commented 8 years ago

@HolgerJeromin Thank you for the PR but I think we should consider another solution to logging going forward. Adding more options to customize each detail of the output will get out of hand.

If you have any ideas feel free to submit a rfc otherwise I'll be revisiting logging in the future and submit one myself.

In the meantime, you can install and create your own grunt-legacy-log and replace grunt.log with it:

var Log = require('grunt-legacy-log').Log;
var log = new Log({
  grunt: grunt,
  // By default it will stream to process.stdout but you can
  // replace it with your own filtering stream instead
  outStream: process.stdout
});
grunt.log = log;
HolgerJeromin commented 8 years ago

If you want to have a "big" solution you could have a look at the Formatters from tslint.

HolgerJeromin commented 8 years ago

If i understood this correctly, i would have to copy nearly the whole file from the legacy-log. Or at least provide most of the functions and direct it to the original (excluding .warn() and .ok())