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

Update README.md for log-level #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdpatrick
Copy link

The default example for setting log level is config.log_level = :info... not config.logger.level = Logger::INFO. This lead to some confusion during setup when my production environment switched from INFO (which it was set to with config.log_level) to debug whenever I used this papertrail gem.

This may be responsible for the surprisingly large number of production environments in debug you guys have encountered...

Confirm existing verbosity: make sure your app is not unintentionally logging at DEBUG level. This is much more common than it sounds.

(Quote from papertrail's support page)

@troy
Copy link
Contributor

troy commented Oct 10, 2014

Thanks for thinking about this this, Dan! Could you point me to where you saw logger.level referenced as the canonical example of how to set the logger (and at the exclusion of log_level), or how you concluded that the current README doesn't change the log level? I know for a fact that log_level has worked in the past and did until very recently, which makes me question the conclusion that this change is built on. The Rails config guide reads:

config.log_level defines the verbosity of the Rails logger. This option defaults to :debug for all modes except production, where it defaults to :info.

Regarding frequency, very few people use this gem (rather than remote_syslog2 or an automatic log aggregation (like Heroku), so the verbosity problem is unrelated to remote_syslog_logger.

@mdpatrick
Copy link
Author

config.log_level is what you'll find as the default (or was in mine anyway) in the rails environment configuration files. I had to switch to using config.logger.level, but only if using this gem. Maybe it's something unique to my setup or rails version? Not sure...

@troy
Copy link
Contributor

troy commented Oct 10, 2014

Okay. Leaving this open until we collectively learn more (and if anyone sees this and wants to comment, feel free).

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.

None yet

2 participants