Skip to content

Commit

Permalink
Update: Rename event variables
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Dec 21, 2017
1 parent 4287660 commit 1ad0f54
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/versioned/^4.0.0/log/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ function logEvents(gulpInst) {

var loggedErrors = [];

gulpInst.on('start', function(e) {
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(e.name) + '\'...');
log.info('Starting', '\'' + chalk.cyan(evt.name) + '\'...');
});

gulpInst.on('stop', function(e) {
var time = prettyTime(e.duration);
gulpInst.on('stop', function(evt) {
var time = prettyTime(evt.duration);
log.info(
'Finished', '\'' + chalk.cyan(e.name) + '\'',
'Finished', '\'' + chalk.cyan(evt.name) + '\'',
'after', chalk.magenta(time)
);
});

gulpInst.on('error', function(e) {
var msg = formatError(e);
var time = prettyTime(e.duration);
gulpInst.on('error', function(evt) {
var msg = formatError(evt);
var time = prettyTime(evt.duration);
log.error(
'\'' + chalk.cyan(e.name) + '\'',
'\'' + chalk.cyan(evt.name) + '\'',
chalk.red('errored after'),
chalk.magenta(time)
);

// If we haven't logged this before, log it and add to list
if (loggedErrors.indexOf(e.error) === -1) {
if (loggedErrors.indexOf(evt.error) === -1) {
log.error(msg);
loggedErrors.push(e.error);
loggedErrors.push(evt.error);
}
});
}
Expand Down

0 comments on commit 1ad0f54

Please sign in to comment.