New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence DebugExceptions template render logs during exceptions #25343

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@gsamokovarov
Contributor

gsamokovarov commented Jun 10, 2016

When an exception is raised, those Action View rendering logs are just
noise for the end developer. I recently silenced those from Web Console,
as we do use Action View rendering in it as well. It used created a half
a screen of rendering logs. I think we can save those in this recent
push for cleaner development logs.

The silencing is a bit hacky and we have a bunch of it now, so we
can also invest in turning off the logs directly from Action View
objects instead of silencing off the logging streams.

Silence DebugExceptions template render logs during exceptions
When an exception is raised, those Action View rendering logs are just
noise for the end developer. I recently silenced those from Web Console,
as we do use Action View rendering in it as well. It used created a half
a screen of rendering logs. I think we can save those in this recent
push for cleaner development logs.

Now, the silencing is a bit hacky and we have a bunch of it now, so we
can also invest in turning off the logs directly from Action View
objects instead of silencing off the logging stream.
@gsamokovarov

This comment has been minimized.

Contributor

gsamokovarov commented Jun 10, 2016

Before

RuntimeError ():

app/controllers/home_controller.rb:4:in `index'
  Rendering /Users/genadi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/rails-f9a39e0d5140/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout
  Rendering /Users/genadi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/rails-f9a39e0d5140/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.html.erb
  Rendered /Users/genadi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/rails-f9a39e0d5140/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.5ms)
  Rendering /Users/genadi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/rails-f9a39e0d5140/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
  Rendered /Users/genadi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/rails-f9a39e0d5140/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.6ms)
  Rendering /Users/genadi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/rails-f9a39e0d5140/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
  Rendered /Users/genadi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/rails-f9a39e0d5140/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.4ms)
  Rendered /Users/genadi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/rails-f9a39e0d5140/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (129.7ms)

After:

RuntimeError ():

app/controllers/home_controller.rb:4:in `index'
@vipulnsward

This comment has been minimized.

Member

vipulnsward commented Jun 19, 2016

Nice, I was going to handle this in #25222 but it can go separately as well.
r? @dhh

@dhh

This comment has been minimized.

Member

dhh commented Jun 21, 2016

Like the result, will let others comment on the implementation. But cleaning up the backtrace noise is 👌

@matthewd

This comment has been minimized.

Member

matthewd commented Jul 1, 2016

Committed as 40fc387, with a test in 1c7a323

@matthewd matthewd closed this Jul 1, 2016

@gsamokovarov

This comment has been minimized.

Contributor

gsamokovarov commented Jul 1, 2016

Thanks @matthewd!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment