remote_syslog_logger icon indicating copy to clipboard operation
remote_syslog_logger copied to clipboard

Update README.md for log-level

Open mdpatrick opened this issue 11 years ago • 3 comments

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)

mdpatrick avatar Oct 10 '14 00:10 mdpatrick

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.

troy avatar Oct 10 '14 00:10 troy

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...

mdpatrick avatar Oct 10 '14 01:10 mdpatrick

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

troy avatar Oct 10 '14 04:10 troy