Hi, Can someone tell me with Locomotive how to see standard out for ruby applications that I run up??? e.g. if there's been a problem starting up a Ruby project/application using Locomotive and I want to see the standard out during startup to see what was happening? Tks Greg
on 2007-02-14 08:25
on 2007-02-14 08:32
Locomotive runs (IIRC) Rails apps under Lighty, so they're all in fcgi processes. These fcgi's don't have a terminal attached so you're pretty much out of luck. I user logger.error to record the information. If you want to run under WEBrick, you can puts to STDERR. I still recommend using the logger, as it works across servers. The STDERR trick may work in Mongrel attached, but not if it's detached (untested). --steve Greg Hauptmann-3 wrote: > happening? > > Tks > Greg > > > > > -- View this message in context: http://www.nabble.com/Locomotive-Question%3A-How-c... Sent from the RubyOnRails Users mailing list archive at Nabble.com.
on 2007-02-14 11:33
tks Steve, Locomative is running mongrel in my setup: greg$ ps -ax | grep ruby 252 ?? S 0:02.10 ruby /Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/i386/bin/mongrel_rails start 253 ?? S 0:02.30 ruby /Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/i386/bin/mongrel_rails start When you say "you can puts to STDERR", what did you mean by this? Is there a way to tell Mongrel or WEBrick to send "standard out" to standard error? (sorry my unix skills aren't that hot) Cheers Greg
on 2007-02-14 17:57
Try STDERR.puts('whatever you like here') that way you get both streams. However, I still think a detached Mongrel will discard any console-related output. Why does the logger not work for you? --steve Greg Hauptmann-3 wrote: > /Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/i386/bin/mongrel_rails > On 2/14/07, s.ross <firstname.lastname@example.org> wrote: >> it >> > >> > Tks >> >> >> > >> > > > > > -- View this message in context: http://www.nabble.com/Locomotive-Question%3A-How-c... Sent from the RubyOnRails Users mailing list archive at Nabble.com.
on 2007-02-14 20:54
I'm interested in seeing the Mongrel output (i.e. I know I can put my own logger.debug statements in myself)..... ....actually I've just been looking at the mongrel.log file that is created. By tailing this file it seems to give the same detail as standard out which is what I was after....my misunderstanding of how mongrel behaves....thats for putting me on the right track Greg