hi does anyone know how to prevent email texts to be written in the logs? date, from, to, cc, bcc, subject, etc should stay in the log, only the body to be excluded. thanks Luma Processing LoginController#register (for 127.0.0.1 at 2008-04-04 23:30:25) [POST] ... Sent mail: Date: Fri, 4 Apr 2008 23:30:27 +0200 From: ... To: ... Subject: ... Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 ... some quite long text ... Redirected to http://localhost:3000/login/login --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> does anyone know how to prevent email texts to be written in the logs? > date, from, to, cc, bcc, subject, etc should stay in the log, only the > body to be excluded.well, the logs also shouldn''t contain email-attachments (which need most space). perhaps it will be easier to ban emails completely from the log files. How can I do that? Luma --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 15 Apr 2008, at 11:41, Luma wrote:> >> does anyone know how to prevent email texts to be written in the >> logs? >> date, from, to, cc, bcc, subject, etc should stay in the log, only >> the >> body to be excluded. > > > well, the logs also shouldn''t contain email-attachments (which need > most space). > > perhaps it will be easier to ban emails completely from the log files. > How can I do that? >It''s not super nice but we''ve got this in our production.rb: config.action_mailer.logger = nil>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-/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 -~----------~----~----~----~------~----~------~--~---
Hi Luma, Luma> does anyone know how to prevent email texts > to be written in the logs?The filter_parameter_logging method should do what you need. Something like... filter_parameter_logging { |k,v| v.replace '''' if k == ''email_body''} It lives in ActionController::Base at api.rubyonrails.org. HTH, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---