Set logging levels in Ruby on Rails

According to the official documentation, you should be using:

config.log_level = :warn # In any environment initializer, or
Rails.logger.level = 0 # at any time

If neither of those work for you, try:

config.log_level = Logger::WARN

And if that doesn’t work, try:

config.logger.level = Logger::WARN

Note: The final method appears to be conflating the two official strategies, but works in some situations

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)