Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added a helpful error message when no logs are available #340

Merged
merged 1 commit into from

2 participants

@fb55

Fixes #329

@fb55 fb55 added a helpful error message
when no logs are available

fixes #329
33dc125
@mmalecki mmalecki merged commit 094ebd4 into foreverjs:master

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 15, 2012
  1. @fb55

    added a helpful error message

    fb55 authored
    when no logs are available
    
    fixes #329
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/forever.js
View
4 lib/forever.js
@@ -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)
Something went wrong with that request. Please try again.