Hi all, I have a rails app that regularly pings the server to check for changes. The problem I''m having is that my "ping" action is printing so much output to the log that it''s swamping any useful data. Is there a way to turn off the log for a specific action? Ideally I''d like it to print to the log only if there''s an error, but I''d be quite happy to just turn off the log altogether for the ping action. I''m using the default Rails logger. Many thanks, Adam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Have you looked at BufferedLogger#silence? http://apidock.com/rails/ActiveSupport/BufferedLogger/silence Adam wrote:> Hi all, > > I have a rails app that regularly pings the server to check for > changes. The problem I''m having is that my "ping" action is printing > so much output to the log that it''s swamping any useful data. Is there > a way to turn off the log for a specific action? Ideally I''d like it > to print to the log only if there''s an error, but I''d be quite happy > to just turn off the log altogether for the ping action. I''m using the > default Rails logger. > > Many thanks, > Adam-- 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-/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 -~----------~----~----~----~------~----~------~--~---