Greg Hauptmann
2007-Feb-14 07:25 UTC
Locomotive Question: How can I see standard out for ruby applications that it starts up???
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
s.ross
2007-Feb-14 07:31 UTC
Re: Locomotive Question: How can I see standard out for ruby applications that it starts up???
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:> > 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 > > > > >-- View this message in context: http://www.nabble.com/Locomotive-Question%3A-How-can-I-see-standard-out-for-ruby-applications-that-it-starts-up----tf3225622.html#a8959986 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2007-Feb-14 10:31 UTC
Re: Locomotive Question: How can I see standard out for ruby applications that it starts up???
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 2/14/07, s.ross <cwdinfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > 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: > > > > 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 > > > > > > > > > > > -- > View this message in context: > http://www.nabble.com/Locomotive-Question%3A-How-can-I-see-standard-out-for-ruby-applications-that-it-starts-up----tf3225622.html#a8959986 > Sent from the RubyOnRails Users mailing list archive at Nabble.com. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
s.ross
2007-Feb-14 16:52 UTC
Re: Locomotive Question: How can I see standard out for ruby applications that it starts up???
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:> > 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 2/14/07, s.ross <cwdinfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> >> 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: >> > >> > 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 >> > >> > > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Locomotive-Question%3A-How-can-I-see-standard-out-for-ruby-applications-that-it-starts-up----tf3225622.html#a8959986 >> Sent from the RubyOnRails Users mailing list archive at Nabble.com. >> >> >> > >> > > > > >-- View this message in context: http://www.nabble.com/Locomotive-Question%3A-How-can-I-see-standard-out-for-ruby-applications-that-it-starts-up----tf3225622.html#a8968880 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2007-Feb-14 19:52 UTC
Re: Locomotive Question: How can I see standard out for ruby applications that it starts up???
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 On 2/15/07, s.ross <cwdinfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > 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: > > > > 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 2/14/07, s.ross <cwdinfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > >> > >> > >> 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: > >> > > >> > 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 > >> > > >> > > > >> > > >> > > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Locomotive-Question%3A-How-can-I-see-standard-out-for-ruby-applications-that-it-starts-up----tf3225622.html#a8959986 > >> Sent from the RubyOnRails Users mailing list archive at Nabble.com. > >> > >> > >> > > >> > > > > > > > > > > > -- > View this message in context: > http://www.nabble.com/Locomotive-Question%3A-How-can-I-see-standard-out-for-ruby-applications-that-it-starts-up----tf3225622.html#a8968880 > Sent from the RubyOnRails Users mailing list archive at Nabble.com. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---