Marnen Laibow-Koser wrote:> Ralph Shnelvar wrote: >> newbie here ... >> >> I am tracing logic putting puts and logger.info calls in my code. >> >> I _think_ Rails is buffering output so that I can''t see what happens >> until I close out webrick. > > But you are probably wrong. If you watch the log scroll by, you will > generally see puts and logger output immediately. > >> >> How do I tell Rails (or whatever) that output is not to be buffered? > > You should not need to. > > Also, get familiar with ruby-debug and test-first development. These > two things will drastically reduce your need for logging. >Dude, don''t be such a dick. Logging doesn''t necessarily have to do with debugging or test-first development. Best, Michael Guterl -- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Michael Guterl wrote:> Marnen Laibow-Koser wrote: >> Ralph Shnelvar wrote: >>> newbie here ... >>> >>> I am tracing logic putting puts and logger.info calls in my code. >>> >>> I _think_ Rails is buffering output so that I can''t see what happens >>> until I close out webrick. >> >> But you are probably wrong. If you watch the log scroll by, you will >> generally see puts and logger output immediately. >> >>> >>> How do I tell Rails (or whatever) that output is not to be buffered? >> >> You should not need to. >> >> Also, get familiar with ruby-debug and test-first development. These >> two things will drastically reduce your need for logging. >> > > Dude, don''t be such a dick. Logging doesn''t necessarily have to do with > debugging or test-first development.I''m aware of that, and even if I were not, that''s no reason for name-calling. You owe me an apology. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org> > Best, > Michael Guterl-- Posted via http://www.ruby-forum.com/. --0022158df84fc1d4b5047d729bca Content-Type: text/plain; charset=ISO-8859-1 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0022158df84fc1d4b5047d729bca--
On Mon, Jan 18, 2010 at 8:04 AM, Michael Guterl <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Marnen Laibow-Koser wrote: >> Ralph Shnelvar wrote: >>> newbie here ... >>> >>> I am tracing logic putting puts and logger.info calls in my code. >>> >>> I _think_ Rails is buffering output so that I can''t see what happens >>> until I close out webrick. >> >> But you are probably wrong. If you watch the log scroll by, you will >> generally see puts and logger output immediately. >> >>> >>> How do I tell Rails (or whatever) that output is not to be buffered? >> >> You should not need to. >> >> Also, get familiar with ruby-debug and test-first development. These >> two things will drastically reduce your need for logging. >> > > Dude, don''t be such a dick. Logging doesn''t necessarily have to do with > debugging or test-first development. >Actually they do. Logging is a form of debugging, and often is suggested as the first form before jumping into a debugger and walking through code. As you get better at test driven development, your need for logging and debugging go down. Of course there is logging that you do just to monitor the health of your application, but since the OP said, "I am tracing logic putting puts and logger.info calls in my code." it seems he is using logging and puts to debug his application. That said, if you are on a *NIX machine, including Mac, it''s not Rails or Ruby that is buffering but the OS. Not sure if there is anything you can do about that. Coming from the Java world, I used to always put my debug output to standard error since that was not buffered and you saw it in real time. -- Curtis Cooley curtis.cooley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org home:http://curtiscooley.com blog:http://ponderingobjectorienteddesign.blogspot.com ==============Leadership is a potent combination of strategy and character. But if you must be without one, be without the strategy. -- H. Norman Schwarzkopf -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Curtis Cooley wrote:> On Mon, Jan 18, 2010 at 8:04 AM, Michael Guterl <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > wrote: >>> generally see puts and logger output immediately. >> Dude, don''t be such a dick. Logging doesn''t necessarily have to do with >> debugging or test-first development. >> > > Actually they do. Logging is a form of debugging, and often is > suggested as the first form before jumping into a debugger and walking > through code. >Unless of course you have specific NEEDS for logging, like HIPAA regulations. Sometimes it doesn''t matter how clever you are, or how well your tests are built. You simply need logs. -- Posted via http://www.ruby-forum.com/. --0015174760d8f06808047d73f493 Content-Type: text/plain; charset=ISO-8859-1 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0015174760d8f06808047d73f493--
Aldric Giacomoni wrote:> Curtis Cooley wrote: >> On Mon, Jan 18, 2010 at 8:04 AM, Michael Guterl <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> >> wrote: >>>> generally see puts and logger output immediately. >>> Dude, don''t be such a dick. Logging doesn''t necessarily have to do with >>> debugging or test-first development. >>> >> >> Actually they do. Logging is a form of debugging, and often is >> suggested as the first form before jumping into a debugger and walking >> through code. >> > > Unless of course you have specific NEEDS for logging, like HIPAA > regulations. Sometimes it doesn''t matter how clever you are, or how well > your tests are built. You simply need logs.Although for that sort of logging, the Rails logger probably wouldn''t be much good. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. --001485f89b7e27273c047d7438cd Content-Type: text/plain; charset=ISO-8859-1 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --001485f89b7e27273c047d7438cd--
On Jan 18, 4:23 pm, Curtis Cooley <curtis.coo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > That said, if you are on a *NIX machine, including Mac, it''s not Rails > or Ruby that is buffering but the OS. Not sure if there is anything > you can do about that. Coming from the Java world, I used to always > put my debug output to standard error since that was not buffered and > you saw it in real time.the default logger is buffered (if you have a look it''s an instance of ActiveSupport::BufferedLogger). It should be flushed on at least a once-per-action basis. Fred -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.