Skip to content

Commit

Permalink
added a helpful error message
Browse files Browse the repository at this point in the history
when no logs are available

fixes #329
  • Loading branch information
fb55 committed Sep 15, 2012
1 parent f69eb4d commit 33dc125
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/forever.js
Expand Up @@ -536,6 +536,10 @@ forever.tail = function (target, length, callback) {
var procs = forever.findByIndex(target, processes)
|| forever.findByScript(target, processes);

if (!procs) {
return callback(new Error('No logs available for process: ' + target));
}

async.mapSeries(procs, tailProcess, function (err, procs) {
return err
? callback(err)
Expand Down

0 comments on commit 33dc125

Please sign in to comment.