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

Default log level #174

Open
mrahul17 opened this issue Oct 20, 2021 · 3 comments
Open

Default log level #174

mrahul17 opened this issue Oct 20, 2021 · 3 comments

Comments

@mrahul17
Copy link

This is a follow up on this issue #59
This gem expects a log level to be explicitly provided in the yaml/environment.rb files failing which it assumes the WARN level as seen here

logger.level = config.log_level || Logger::WARN

Will it better if we fallback to Rails.logger.level if nothing is specified? I think users would expect LogStasher to use the same severity level as configured for Rails.
I am willing to make this change if it sounds good, or atleast add the current way to documentation because I suspect this is going to be a breaking change

@ibrahima
Copy link

Thank you for posting about this! I have been wondering about this for years (but not enough to actually look deeply into this apparently) and was very confused why the Rails log level was not being respected. I agree that falling back to Rails.logger.level would be a more expected default behavior.

@shadabahmed
Copy link
Owner

Agree. cc @petergoldstein

@petergoldstein
Copy link
Collaborator

@shadabahmed Sure. I agree that's a more sensible default behavior.

For packaging my suggestion would be:

  1. Determine if there are any other breaking functionality changes that we'd want to make
  2. Make this change
  3. Drop support for Rails 5.2 (and possibly Ruby 2.6, which is EOLd in ~2 months)
  4. Bundle that all as a breaking release.

That'll get this change in, properly signal breaking, and shrink the support matrix for future versions/changes.

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

No branches or pull requests

4 participants