Skip to content

Commit 3957fa1

Browse files
committed
Update: Debug log task dependencies to allow them to be silenced
1 parent 6be4bbe commit 3957fa1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/versioned/^4.0.0/log/events.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ function logEvents(gulpInst) {
1313
gulpInst.on('start', function(evt) {
1414
// TODO: batch these
1515
// so when 5 tasks start at once it only logs one time with all 5
16-
log.info('Starting', '\'' + chalk.cyan(evt.name) + '\'...');
16+
var level = evt.branch ? 'debug' : 'info';
17+
log[level]('Starting', '\'' + chalk.cyan(evt.name) + '\'...');
1718
});
1819

1920
gulpInst.on('stop', function(evt) {
2021
var time = prettyTime(evt.duration);
21-
log.info(
22+
var level = evt.branch ? 'debug' : 'info';
23+
log[level](
2224
'Finished', '\'' + chalk.cyan(evt.name) + '\'',
2325
'after', chalk.magenta(time)
2426
);
@@ -27,7 +29,8 @@ function logEvents(gulpInst) {
2729
gulpInst.on('error', function(evt) {
2830
var msg = formatError(evt);
2931
var time = prettyTime(evt.duration);
30-
log.error(
32+
var level = evt.branch ? 'debug' : 'error';
33+
log[level](
3134
'\'' + chalk.cyan(evt.name) + '\'',
3235
chalk.red('errored after'),
3336
chalk.magenta(time)

0 commit comments

Comments
 (0)