I have a lot of partials, so I find that my production.log file gets
pretty cluttered and large quickly and it makes it more difficult to
use. I like most of the messages, I just don't see a need for taking
up a line for each partial that is rendered. The logging is done in
action_pack in the log_subscriber file here:

  class LogSubscriber < ActiveSupport::LogSubscriber
    def render_template(event)
      message = "Rendered #{from_rails_root(event.payload[:identifier])}"
      message << " within #{from_rails_root(event.payload[:layout])}"
if event.payload[:layout]
      message << (" (%.1fms)" % event.duration)
      info(message)
    end


As an experiment, I changed the info line to:

      info(message) if !message.include?('/_')

and I'm getting the behavior I want. I couldn't figure out any "right"
way to suppress the partial message except to change the logging level
from info, but I want the other info messages.

Should I just monkey patch the above routine, or is there a better way
to do this, or should I submit a feature request to the rails team?

And, is anyone else bothered by the partials cluttering up the log file?

Thanks.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to