Skip to content

Commit

Permalink
Update: Debug log task dependencies to allow them to be silenced
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Dec 21, 2017
1 parent 6be4bbe commit 3957fa1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/versioned/^4.0.0/log/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ function logEvents(gulpInst) {
gulpInst.on('start', function(evt) {
// TODO: batch these
// so when 5 tasks start at once it only logs one time with all 5
log.info('Starting', '\'' + chalk.cyan(evt.name) + '\'...');
var level = evt.branch ? 'debug' : 'info';
log[level]('Starting', '\'' + chalk.cyan(evt.name) + '\'...');
});

gulpInst.on('stop', function(evt) {
var time = prettyTime(evt.duration);
log.info(
var level = evt.branch ? 'debug' : 'info';
log[level](
'Finished', '\'' + chalk.cyan(evt.name) + '\'',
'after', chalk.magenta(time)
);
Expand All @@ -27,7 +29,8 @@ function logEvents(gulpInst) {
gulpInst.on('error', function(evt) {
var msg = formatError(evt);
var time = prettyTime(evt.duration);
log.error(
var level = evt.branch ? 'debug' : 'error';
log[level](
'\'' + chalk.cyan(evt.name) + '\'',
chalk.red('errored after'),
chalk.magenta(time)
Expand Down

0 comments on commit 3957fa1

Please sign in to comment.