NoMethodError `silence` On Logger Instance

Posted By Weston Ganger

After upgrading to Rails 4 from Rails 3 I was seeing this error: NoMethodError 'silence' on Logger instance. The problem had to do with a Log rotation I had in place, this just required a quick fix to the class name

# old code
config.logger = Logger.new(config.paths['log'].first, 100, 104857600)

# new code
config.logger = ActiveSupport::Logger.new(config.paths['log'].first, 100, 104857600)

Related External Links:

Article Topic:Software Development - Ruby / Rails

Date:January 12, 2017