forever logs my/program #123

Closed
temsa opened this Issue Sep 27, 2011 · 6 comments

Projects

None yet

3 participants

@temsa
temsa commented Sep 27, 2011

It would be great to have a forever logs my/program with an output in line, separated by space, so you could do :
$>forever start my/program && tail -fforever logs my/program`` and get all the logs from your program all at once.

I guess I can make a pullrequest if you lack of time to do this.

@temsa
temsa commented Sep 27, 2011

a one-liner that does the job:

require('forever').list(false, function(err, list) {console.log(list.filter(function(e){return e.file == arg || e.uid == arg}).map(function(e){return e.logFile}).join(' '))})
@indexzero
Member

Duplicate of #93. One-liner looks good, might try that

@indexzero indexzero closed this Oct 9, 2011
@indexzero
Member

Oh wait, this isn't a duplicate. Neat feature.

@indexzero indexzero reopened this Oct 9, 2011
@indexzero indexzero added a commit that closed this issue Oct 9, 2011
@indexzero indexzero [api test] Added `forever logs` CLI commands and `forever.tail()` met…
…hod with appropriate tests. Fixes #123, #93
0d6f85f
@indexzero indexzero closed this in 0d6f85f Oct 9, 2011
@shilov
shilov commented Oct 17, 2011

Maybe I'm misinterpreting it, but shouldn't it keep tail running?

When I run forever logs my_currently_running_script.js it dumps the log contents then exits.
I was expecting it to keep the log file open and piping into stdout just like tail -f does.

@indexzero if you prefer, I can create a new issue if this is a bug and not the intended functionality.

@indexzero
Member

The current implementation is the intended functionality. I could probably do what you wanted via

  $ forever logs file myscript.js

Thoughts?

@shilov
shilov commented Oct 23, 2011

That would be beautiful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment