I''ve searched high and low and played around and couldn''t
figure out
how to override what the logger prints for a specific model (one that
has many columns of multi-100K blobs).
I ''tail -f log/development.log'' in a shell within emacs and it
really
doesn''t like the huge lines dumped out during saves/updates.
So, I finally figured out that if I put the following in my
config/environment.rb I can trim the binary data dumps:
class Logger
private
alias old_format_message format_message
def format_message(severity, timestamp, progname, msg)
# uses a non-greedy match
msg.to_str.gsub!(/= x''(.*?)''(,|\s)/,''=
x\''BINARY_DATA\''\2'')
"#{msg}\n"
end
end
But, I know that this is a kluge so any advice on how to control the
dump on column level within the model or even on the model level will
be much appreciated.
Thanks much.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---