gulp-cli icon indicating copy to clipboard operation
gulp-cli copied to clipboard

Log only the "Finished" messages and not the "Starting" ones

Open marcofugaro opened this issue 6 years ago • 3 comments

Hey, it would be really useful if I could tell Gulp to log only when a task is done, not when it starts. I don't actually care when the task starts during development. I only care about how much time it took and if it ran successfully.

I've tried the log-level option and it just turns the starting/finished logs on or off.

What do you think?

marcofugaro avatar Jan 03 '19 14:01 marcofugaro

@marcofugaro Now we consider that gulp-cli enable to customize colors and messages of logs. If it is achieved, gulp-cli will be able to output an empty line too instead of starting log.

sttk avatar Jan 05 '19 03:01 sttk

@sttk I think we should avoid logging any line that is "falsey" so they can set the theming to false to disable.

phated avatar May 20 '20 05:05 phated

@phated To do that, we should modify lib/shared/log/log-levels.js in PR #161 as follows:

  • L33: log.on(level, console.error);log.on(function(s) { if (s) console.error(s): });
  • L35: log.on(level, console.log);log.on(function(s) { if (s) console.log(s): });

sttk avatar May 20 '20 12:05 sttk