Skip to content
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

Add ActionController::Base.log_at #37289

Merged
merged 1 commit into from Sep 24, 2019

Conversation

@georgeclaghorn
Copy link
Member

commented Sep 24, 2019

Allow setting a different log level per request.

# Use the debug level if a particular cookie is set.
class ApplicationController < ActionController::Base
  log_at :debug, if: -> { cookies[:debug] }
end
@georgeclaghorn georgeclaghorn force-pushed the georgeclaghorn:log-at branch 2 times, most recently from 8d92f9b to 182ae1f Sep 24, 2019
Allow setting a different log level per request.
@georgeclaghorn georgeclaghorn force-pushed the georgeclaghorn:log-at branch from 182ae1f to 1afc0e9 Sep 24, 2019
@georgeclaghorn georgeclaghorn marked this pull request as ready for review Sep 24, 2019
@georgeclaghorn georgeclaghorn merged commit 75a5329 into rails:master Sep 24, 2019
2 checks passed
2 checks passed
buildkite/rails Build #63856 passed (19 minutes, 59 seconds)
Details
codeclimate All good!
Details
@georgeclaghorn georgeclaghorn deleted the georgeclaghorn:log-at branch Sep 24, 2019
@rafaelfranca

This comment has been minimized.

Copy link
Member

commented Sep 24, 2019

This is a great addition! Thank you George.

@kaspth

This comment has been minimized.

Copy link
Member

commented Sep 24, 2019

Sweet! Should we change the log level default in production back to info now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.