mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Make reError more robust and leverage console.log sugar more.
This commit is contained in:
@@ -53,7 +53,7 @@ var prevLine = '';
|
|||||||
var push = Array.prototype.push;
|
var push = Array.prototype.push;
|
||||||
|
|
||||||
/** Used to detect error messages */
|
/** Used to detect error messages */
|
||||||
var reError = /\berror\b/i;
|
var reError = /(?:\be|E)rror\b/;
|
||||||
|
|
||||||
/** Used to detect valid job ids */
|
/** Used to detect valid job ids */
|
||||||
var reJobId = /^[a-z0-9]{32}$/;
|
var reJobId = /^[a-z0-9]{32}$/;
|
||||||
@@ -592,7 +592,7 @@ Job.prototype.restart = function(callback) {
|
|||||||
label = options.name + ':';
|
label = options.name + ':';
|
||||||
|
|
||||||
logInline();
|
logInline();
|
||||||
console.log(label + ' ' + description + ' restart %d of %d', ++this.attempts, this.retries);
|
console.log('%s %s restart %d of %d', label, description, ++this.attempts, this.retries);
|
||||||
|
|
||||||
return this.remove(onGenericRestart);
|
return this.remove(onGenericRestart);
|
||||||
};
|
};
|
||||||
@@ -755,7 +755,7 @@ Tunnel.prototype.restart = function(callback) {
|
|||||||
this.restarting = true;
|
this.restarting = true;
|
||||||
|
|
||||||
logInline();
|
logInline();
|
||||||
console.log('Tunnel ' + this.id + ': restart %d of %d', ++this.attempts, this.retries);
|
console.log('Tunnel %s: restart %d of %d', this.id, ++this.attempts, this.retries);
|
||||||
|
|
||||||
var jobs = this.jobs,
|
var jobs = this.jobs,
|
||||||
active = jobs.active,
|
active = jobs.active,
|
||||||
|
|||||||
Reference in New Issue
Block a user