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

Heed RAILS_LOG_LEVEL in production config. #2333

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Heed RAILS_LOG_LEVEL in production config. #2333

merged 1 commit into from
Jul 4, 2023

Conversation

sengi
Copy link
Contributor

@sengi sengi commented Jul 4, 2023

This was added to Rails's template for production.rb in https://github.com/rails/rails/blob/3b83758/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt#L73

We want to be able to control the log level this way so that:

  • we don't have to rebuild an app just to change its log level
  • we can enable debug logging if we need it to investigate a problem that's hard to reproduce
  • we can tune the log levels so as not to waste resources logging things that we don't care about the rest of the time
  • if a change to an app introduces a problem with logspew, we can just dial down the log level while someone tracks down the underlying issue

This is a bulk change; all 43 PRs are identical except for apps which had their loglevel set to debug, which we're resetting to info as the default.

To approve, use https://github.com/alphagov/bulk-merger:

./review 'Heed RAILS_LOG_LEVEL in production config.'

This was added to Rails's template for production.rb in
https://github.com/rails/rails/blob/3b83758/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt#L73

We want to be able to control the log level this way so that:

- we don't have to rebuild an app just to change its log level
- we can enable debug logging if we need it to investigate a problem that's
  hard to reproduce
- we can tune the log levels so as not to waste resources logging things that
  we don't care about the rest of the time
- if a change to an app introduces a problem with logspew, we can just
  dial down the log level while someone tracks down the underlying issue

This is a bulk change; all 43 PRs are identical except for apps which had their
loglevel set to `debug`, which we're resetting to `info` as the default.

To approve, use https://github.com/alphagov/bulk-merger (`./review 'Heed
RAILS_LOG_LEVEL in production config.`)
@sengi sengi merged commit 087c0c8 into main Jul 4, 2023
7 checks passed
@sengi sengi deleted the sengi/loglevel branch July 4, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants